diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index ac6fe61e51..c1c8e2c95c 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -1425,23 +1425,27 @@ PropertyString::PropertyString() = default; PropertyString::~PropertyString() = default; -void PropertyString::setValue(const char* newLabel) +void PropertyString::setValue(const char* newValue) { - if (!newLabel) { + if (!newValue) { return; } - if (_cValue == newLabel) { + if (_cValue == newValue) { return; } std::vector>> propChanges; - std::string label = newLabel; + std::string newValueStr = newValue; auto obj = dynamic_cast(getContainer()); bool commit = false; if (obj && this == &obj->Label) { - propChanges = obj->onProposedLabelChange(label); + propChanges = obj->onProposedLabelChange(newValueStr); + if (_cValue == newValueStr) { + // OnProposedLabelChange has changed the new value to what the current value is + return; + } if (!propChanges.empty() && !GetApplication().getActiveTransaction()) { commit = true; std::ostringstream str; @@ -1451,7 +1455,7 @@ void PropertyString::setValue(const char* newLabel) } aboutToSetValue(); - _cValue = label; + _cValue = newValueStr; hasSetValue(); for (auto& change : propChanges) {