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 May 27, 2024
1 parent 69430f3 commit 7988900
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4536,21 +4536,21 @@ void ExportMusicXml::tempoText(TempoText const* const text, int staff)
qPrintable(text->xmlText()));
*/
_attr.doAttr(_xml, false);
if (text->visible()) {
//if (text->visible()) {
_xml.stag(QString("direction placement=\"%1\"").arg((text->placement() == Placement::BELOW ) ? "below" : "above"));
wordsMetronome(_xml, _score, text, offset);

if (staff)
_xml.tag("staff", staff);
}
// }

// Format tempo with maximum 2 decimal places, because in some MuseScore files tempo is stored
// imprecisely and this could cause rounding errors (e.g. 92 BPM would be saved as 91.9998).
qreal bpm = text->tempo() * 60.0;
qreal bpmRounded = round(bpm * 100) / 100;
_xml.tagE(QString("sound tempo=\"%1\"").arg(QString::number(bpmRounded)));

if (text->visible())
//if (text->visible())
_xml.etag();
}

Expand Down

0 comments on commit 7988900

Please sign in to comment.