We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d14b03 commit 1a5940fCopy full SHA for 1a5940f
src/engraving/libmscore/dynamic.cpp
@@ -420,8 +420,11 @@ void Dynamic::startEdit(EditData& ed)
420
void Dynamic::endEdit(EditData& ed)
421
{
422
TextBase::endEdit(ed);
423
- if (xmlText() != QString::fromUtf8(dynList[int(_dynamicType)].text)) {
424
- _dynamicType = Type::OTHER;
+ auto text = xmlText();
+ auto it = std::find_if(std::begin(dynList), std::end(dynList), [text](const Ms::Dyn& d) { return text == QString::fromUtf8(d.text); });
425
+ _dynamicType = it == std::end(dynList) ? Type::OTHER : static_cast<Type>(it - std::begin(dynList));
426
+ for (auto* e : this->linkList()) {
427
+ toDynamic(e)->_dynamicType = _dynamicType;
428
}
429
430
0 commit comments