Revisão | 28951 (tree) |
---|---|
Hora | 2020-07-15 05:08:52 |
Autor | stefankueng |
Merged revision(s) r28950 from trunk:
* Don't use the selected index if the property name is specified.
@@ -8,6 +8,9 @@ | ||
8 | 8 | file contained an utf8 BOM. (Stefan) |
9 | 9 | - BUG: Crash in ProjectMonitor when rearranging |
10 | 10 | the tree view. (Stefan) |
11 | +- BUG: opening the properties dialog from command | |
12 | + line with param /property showed wrong or | |
13 | + empty values. (Stefan) | |
11 | 14 | |
12 | 15 | Version 1.14.0 |
13 | 16 | See the release notes: https://tortoisesvn.net/tsvn_1.14_releasenotes.html |
@@ -739,10 +739,15 @@ | ||
739 | 739 | if (propName.size()) |
740 | 740 | dlg->SetPropertyName(sName); |
741 | 741 | dlg->SetPathList(m_pathlist); |
742 | - if (m_properties.find(sName) != m_properties.end()) | |
742 | + auto foundIt = m_properties.find(sName); | |
743 | + if (foundIt != m_properties.end()) | |
743 | 744 | { |
744 | 745 | // the property already exists: switch to "edit" instead of "add" |
745 | - PropValue * prop = (PropValue*)m_propList.GetItemData(selIndex); | |
746 | + PropValue* prop = nullptr; | |
747 | + if (selIndex >= 0 && propName.empty()) | |
748 | + prop = (PropValue*)m_propList.GetItemData(selIndex); | |
749 | + else | |
750 | + prop = &foundIt->second; | |
746 | 751 | dlg->SetPropertyName(sName); |
747 | 752 | if (prop->allthesamevalue && !prop->isinherited) |
748 | 753 | dlg->SetPropertyValue(prop->value); |