Skip to content

Commit

Permalink
Fix GH#19019: Fix empty figured-bass in MusicXML export
Browse files Browse the repository at this point in the history
Backport of musescore#21772
  • Loading branch information
rettinghaus authored and Jojo-Schmitz committed Mar 11, 2024
1 parent 7e33e08 commit b2c3a04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5735,6 +5735,8 @@ static void figuredBass(XmlWriter& xml, int strack, int etrack, int track, const
if (track == wtrack) {
if (e->type() == ElementType::FIGURED_BASS) {
const FiguredBass* fb = dynamic_cast<const FiguredBass*>(e);
if (fb->numOfItems() == 0)
return;
//qDebug("figuredbass() track %d seg %p fb %p seg %p tick %d ticks %d cr %p tick %d ticks %d",
// track, seg, fb, fb->segment(), fb->segment()->tick(), fb->ticks(), cr, cr->tick(), cr->actualTicks());
bool extend = fb->ticks() > cr->actualTicks();
Expand All @@ -5750,7 +5752,6 @@ static void figuredBass(XmlWriter& xml, int strack, int etrack, int track, const
const bool writeDuration = fb->ticks() < cr->actualTicks();
fb->writeMusicXML(xml, true, crEndTick.ticks(), fbEndTick.ticks(),
writeDuration, divisions);

// Check for changing figures under a single note (each figure stored in a separate segment)
for (Segment* segNext = seg->next(); segNext && segNext->element(track) == NULL; segNext = segNext->next()) {
for (Element* annot : segNext->annotations()) {
Expand Down

0 comments on commit b2c3a04

Please sign in to comment.