MusicXML: do not export dynamics if smaller than 0. See #17872

This commit is contained in:
lasconic 2012-08-21 19:52:21 +02:00
parent e9a4c28a04
commit f5bed11a87

View file

@ -2907,8 +2907,10 @@ void ExportMusicXml::dynamic(Dynamic const* const dyn, int staff)
xml.tag("offset", offs);
if (staff)
xml.tag("staff", staff);
xml.tagE(QString("sound dynamics=\"%1\"").arg(QString::number(dyn->velocity() * 100.0 / 90.0, 'f', 2)));
if(dyn->velocity() > 0)
xml.tagE(QString("sound dynamics=\"%1\"").arg(QString::number(dyn->velocity() * 100.0 / 90.0, 'f', 2)));
xml.etag();
}