From a42dd09a816bf7839cebf6f47ecf8f370b4ad2e1 Mon Sep 17 00:00:00 2001 From: sammik Date: Thu, 19 Sep 2024 00:24:33 +0200 Subject: [PATCH] fix #24763 - in note input mode, add clef / time / key after latest added note --- src/notation/internal/notationinteraction.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/notation/internal/notationinteraction.cpp b/src/notation/internal/notationinteraction.cpp index 16bb7f3182b35..1fd8f92159f35 100644 --- a/src/notation/internal/notationinteraction.cpp +++ b/src/notation/internal/notationinteraction.cpp @@ -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);