Skip to content

Commit

Permalink
fix #24763 - in note input mode, add clef / time / key after latest a…
Browse files Browse the repository at this point in the history
…dded note
  • Loading branch information
sammik committed Sep 19, 2024
1 parent 65ac7a5 commit a42dd09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/notation/internal/notationinteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,15 @@ bool NotationInteraction::applyPaletteElement(mu::engraving::EngravingItem* elem
}
} else if (isLineNoteToNote) {
applyLineNoteToNote(score, toNote(sel.elements()[0]), toNote(sel.elements()[1]), element);
} else if ((element->isClef() || element->isTimeSig() || element->isKeySig()) && score->noteEntryMode()) {
// in note input mode place clef / time sig / key sig before cursor
EngravingItem* e = score->inputState().cr();
if (!e) {
e = sel.elements().front();
} else if (e->isChord()) {
e = toChord(e)->notes().front();
}
applyDropPaletteElement(score, e, element, modifiers);
} else {
for (EngravingItem* e : sel.elements()) {
applyDropPaletteElement(score, e, element, modifiers);
Expand Down

0 comments on commit a42dd09

Please sign in to comment.