Skip to content

Commit

Permalink
fix #291378: stay on same staff when entering stickings and other seg…
Browse files Browse the repository at this point in the history
…ment text
  • Loading branch information
MarcSabatella committed Jun 27, 2019
1 parent 4b543fd commit f501fb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,7 @@ void ScoreView::textTab(bool back)
TextBase* ot = toTextBase(oe);
Tid tid = ot->tid();
ElementType type = ot->type();
int staffIdx = ot->staffIdx();

// get prev/next element now, as current element may be deleted if empty
Element* el = back ? score()->prevElement() : score()->nextElement();
Expand Down Expand Up @@ -2450,7 +2451,7 @@ void ScoreView::textTab(bool back)
// check annotation list of new segment
Segment* ns = nn->chord()->segment();
for (Element* e : ns->annotations()) {
if (e->type() != type)
if (e->staffIdx() != staffIdx || e->type() != type)
continue;
TextBase* nt = toTextBase(e);
if (nt->tid() == tid) {
Expand Down

0 comments on commit f501fb6

Please sign in to comment.