Skip to content

Commit

Permalink
fix #25996 - invalid MusicXML for empty StaffText
Browse files Browse the repository at this point in the history
  • Loading branch information
lvinken committed Jul 23, 2014
1 parent 9661235 commit 6449a55
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mscore/exportxml.cpp
Expand Up @@ -2915,6 +2915,13 @@ void ExportMusicXml::words(Text const* const text, int staff)
qDebug("ExportMusicXml::words userOff.x=%f userOff.y=%f text='%s'",
text->userOff().x(), text->userOff().y(), qPrintable(text->text()));
*/

if (text->text() == "") {
// sometimes empty Texts are present, exporting would result
// in invalid MusicXML (as an empty direction-type would be created)
return;
}

directionTag(xml, attr, text);
if (text->type() == Element::Type::REHEARSAL_MARK) {
// TODO: check if dead code (see rehearsal below)
Expand Down

0 comments on commit 6449a55

Please sign in to comment.