Skip to content

Commit

Permalink
fix #302822: breaks are now accessible via keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
SKefalidis committed Apr 9, 2020
1 parent dcb744c commit b140feb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libmscore/navigate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,9 @@ Element* Score::nextElement()
return mb;
}
}
case ElementType::LAYOUT_BREAK: {
staffId = 0; // otherwise it will equal -1, which breaks the navigation
}
default:
break;
}
Expand Down Expand Up @@ -776,6 +779,9 @@ Element* Score::prevElement()
return mb;
}
}
case ElementType::LAYOUT_BREAK: {
staffId = 0; // otherwise it will equal -1, which breaks the navigation
}
default:
break;
}
Expand Down
4 changes: 4 additions & 0 deletions libmscore/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,8 @@ Element* Segment::nextElement(int activeStaff)
return nmb;
else if (nme && nme->isTextBase() && nme->staffIdx() == e->staffIdx())
return nme;
else if (nme && nme->isLayoutBreak() && e->staffIdx() == 0)
return nme;
}

while (nextSegment) {
Expand Down Expand Up @@ -1769,6 +1771,8 @@ Element* Segment::prevElement(int activeStaff)
Element* me = measure()->el().empty() ? nullptr : measure()->el().back();
if (me && me->isTextBase() && me->staffIdx() == e->staffIdx())
return me;
else if (me && me->isLayoutBreak() && e->staffIdx() == 0)
return me;
else if (psm != pmb)
return pmb;
}
Expand Down

0 comments on commit b140feb

Please sign in to comment.