Skip to content

Commit

Permalink
fix export part of musescore#15903 for 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lvinken authored and Jojo-Schmitz committed Jul 31, 2023
1 parent 295b71e commit 408f0f0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2026,11 +2026,16 @@ void ExportMusicXml::keysig(const KeySig* ks, ClefType ct, int staff, bool visib
for (const KeySym& ksym : map) {
int line = static_cast<int>(round(2 * ksym.spos.y()));
int step = (po - line) % 7;
//qDebug(" keysym sym %d spos %g,%g pos %g,%g -> line %d step %d",
// ksym.sym, ksym.spos.x(), ksym.spos.y(), ksym.pos.x(), ksym.pos.y(), line, step);
_xml.tag("key-step", QString(QChar(table2[step])));
_xml.tag("key-alter", accSymId2alter(ksym.sym));
_xml.tag("key-accidental", accSymId2MxmlString(ksym.sym));
QString tagName = "key-accidental";
QString s = accSymId2MxmlString(ksym.sym);
//qDebug(" keysym sym %d spos %g,%g pos %g,%g -> line %d step %d s '%s' name '%s'",
// static_cast<int>(ksym.sym), ksym.spos.x(), ksym.spos.y(), ksym.pos.x(), ksym.pos.y(),
// line, step, qPrintable(s), Sym::id2name(ksym.sym));
if (s == "other")
tagName += QString(" smufl=\"%1\"").arg(Sym::id2name(ksym.sym));
_xml.tag(tagName, s);
}
}
else {
Expand Down Expand Up @@ -2313,6 +2318,8 @@ static void writeAccidental(XmlWriter& xml, const QString& tagName, const Accide
QString s = accidentalType2MxmlString(acc->accidentalType());
if (s != "") {
QString tag = tagName;
if (s == "other")
tag += " smufl=\"" + accidentalType2SmuflMxmlString(acc->accidentalType()) + "\"";
if (acc->bracket() != AccidentalBracket::NONE)
tag += " parentheses=\"yes\"";
xml.tag(tag, s);
Expand Down

0 comments on commit 408f0f0

Please sign in to comment.