Skip to content

Commit

Permalink
Fix GH#17625: Sync figured bass between parts & score
Browse files Browse the repository at this point in the history
Backport of musescore#20139 (of its pretty minimal first version, the rest introduces a crash on undo)
  • Loading branch information
miiizen authored and Jojo-Schmitz committed Nov 24, 2023
1 parent 1d5b021 commit 6a6c6b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions libmscore/edit.cpp
Expand Up @@ -4565,7 +4565,8 @@ void Score::undoAddElement(Element* element)
&& et != ElementType::TREMOLOBAR
&& et != ElementType::FRET_DIAGRAM
&& et != ElementType::FERMATA
&& et != ElementType::HARMONY)
&& et != ElementType::HARMONY
&& et != ElementType::FIGURED_BASS)
) {
undo(new AddElement(element));
return;
Expand Down Expand Up @@ -4741,7 +4742,8 @@ void Score::undoAddElement(Element* element)
|| element->isSticking()
|| element->isFretDiagram()
|| element->isFermata()
|| element->isHarmony()) {
|| element->isHarmony()
|| element->isFiguredBass()) {
Segment* segment = element->parent()->isFretDiagram() ? toSegment(element->parent()->parent()) : toSegment(element->parent());
Fraction tick = segment->tick();
Measure* m = score->tick2measure(tick);
Expand Down
2 changes: 1 addition & 1 deletion libmscore/figuredbass.cpp
Expand Up @@ -1768,7 +1768,7 @@ FiguredBass* Score::addFiguredBass()
}

FiguredBass * fb;
bool bNew;
bool bNew = true;
if (el->isNote()) {
ChordRest * cr = toNote(el)->chord();
fb = FiguredBass::addFiguredBassToSegment(cr->segment(), cr->staffIdx() * VOICES, Fraction(0,1), &bNew);
Expand Down

0 comments on commit 6a6c6b4

Please sign in to comment.