Skip to content

Commit

Permalink
Update importmxmlpass2.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Aug 17, 2024
1 parent a766b0a commit 67c12d3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3879,12 +3879,20 @@ void MusicXMLParserDirection::textToDynamic(QString& text) const
}
}
}
for (auto dyn : dynList) {
if (dyn.tag == simplifiedText) {
text = text.replace(simplifiedText, dyn.text);
break;
#if 0
// We don't want to count a single 'm', 'r', 's' or 'z' as a whole dynamic
static const QRegularExpression singleCharDynamic("^[mrsz]$");
// try to find a dynamic - xml representation or
// if found add to dynamics list and set text to blank string
if (!simplifiedText.contains(singleCharDynamic) && TConv::dynamicValid(simplifiedText.toStdString())) {
Dynamic::Type dt = TConv::fromXml(simplifiedText.toStdString(), Dynamic::Type::OTHER);
if (dt != Dynamic::Type::OTHER) {
_dynaVelocity = QString::number(round(Dynamic::dynamicVelocity(dt) / 0.9));
_dynamicsList.push_back(Dynamic::dynamicTypeName(dt));
text.clear();
}
}
#endif
}

//---------------------------------------------------------
Expand Down

0 comments on commit 67c12d3

Please sign in to comment.