From 318b622cca183695b0f1ae546d20dc28c1563b79 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Fri, 22 Nov 2024 11:38:56 +0100 Subject: [PATCH] Fix GH#25429: Disable the display of the key signature when changing transposing instruments if score is in concert pitch Backport of #25601 --- libmscore/keysig.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmscore/keysig.cpp b/libmscore/keysig.cpp index 091a0182648c4..7d402870b9e18 100644 --- a/libmscore/keysig.cpp +++ b/libmscore/keysig.cpp @@ -89,6 +89,10 @@ void KeySig::addLayout(SymId sym, qreal x, int line) void KeySig::layout() { + // We do not show keys if the key is for instrument change and we are in concert pitch mode + if (forInstrumentChange() && concertPitch()) + return; + qreal _spatium = spatium(); setbbox(QRectF()); @@ -100,7 +104,6 @@ void KeySig::layout() } return; } - _sig.keySymbols().clear(); if (staff() && !staff()->staffType(tick())->genKeysig()) return;