Skip to content

Commit

Permalink
Fix GH#24026: Ensure correct key signature accidentals after clef change
Browse files Browse the repository at this point in the history
Backport of musescore#24522
  • Loading branch information
evertvanaart authored and Jojo-Schmitz committed Nov 8, 2024
1 parent 07c8cb7 commit 69efa78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libmscore/keysig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
// the file LICENCE.GPL
//=============================================================================

#include "sym.h"
#include "staff.h"
#include "clef.h"
#include "keysig.h"
#include "measure.h"
#include "segment.h"
#include "score.h"
#include "segment.h"
#include "staff.h"
#include "sym.h"
#include "system.h"
#include "undo.h"
#include "xml.h"
Expand Down Expand Up @@ -112,7 +112,7 @@ void KeySig::layout()
Clef* c = nullptr;
if (segment()) {
for (Segment* seg = segment()->prev1(); !c && seg && seg->tick() == tick(); seg = seg->prev1())
if (seg->isClefType() || seg->isHeaderClefType())
if (seg->enabled() && (seg->isClefType() || seg->isHeaderClefType()))
c = toClef(seg->element(track()));
}
if (c)
Expand Down

0 comments on commit 69efa78

Please sign in to comment.