diff --git a/libmscore/edit.cpp b/libmscore/edit.cpp index 8becba145cb56..0ff5a7c9c16a5 100644 --- a/libmscore/edit.cpp +++ b/libmscore/edit.cpp @@ -739,6 +739,10 @@ bool Score::rewriteMeasures(Measure* fm, const Fraction& ns, int staffIdx) void Score::cmdAddTimeSig(Measure* fm, int staffIdx, TimeSig* ts, bool local) { + if (!score()->selection().firstChordRest()) + return; + auto selectTrack = score()->selection().firstChordRest()->track(); + auto selectTick = score()->selection().firstChordRest()->tick(); deselectAll(); if (fm->isMMRest()) @@ -911,6 +915,13 @@ void Score::cmdAddTimeSig(Measure* fm, int staffIdx, TimeSig* ts, bool local) } } delete ts; + + // Attempt valid selection afterward: + if (auto msr = score()->tick2measure(selectTick)) { + if (auto first = msr->first()) { + if (auto cr = first->nextChordRest(selectTrack)) { + score()->select(cr->isChord() ? toChord(cr)->upNote() : cr); + }}} } //---------------------------------------------------------