Skip to content

Commit

Permalink
Merge pull request #4705 from L0uisc/line-layout-nav
Browse files Browse the repository at this point in the history
fix #70531 Restore keyboard nav in continuous view
  • Loading branch information
anatoly-os committed Feb 25, 2019
1 parent 8d9bd8d commit d8fd46d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions libmscore/scoreElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ class ScoreElement {
bool isSlurTieSegment() const { return isSlurSegment() || isTieSegment(); }
bool isSLineSegment() const;
bool isBox() const { return isVBox() || isHBox() || isTBox() || isFBox(); }
bool isVBoxBase() const { return isVBox() || isTBox() || isFBox(); }
bool isMeasureBase() const { return isMeasure() || isBox(); }
bool isTextBase() const;
bool isTextLineBaseSegment() const {
Expand Down
9 changes: 7 additions & 2 deletions mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2812,6 +2812,9 @@ void ScoreView::pageNext()
if (score()->layoutMode() == LayoutMode::LINE) {
qreal x = xoffset() - width() * .8;
MeasureBase* lm = score()->last();
// Vertical frames aren't laid out in continuous view
while (lm->isVBoxBase())
lm = lm->prev();
qreal lx = (lm->pos().x() + lm->width()) * mag() - width() * .8;
if (x < -lx)
x = -lx;
Expand Down Expand Up @@ -2896,8 +2899,10 @@ void ScoreView::pageEnd()
return;
if (score()->layoutMode() == LayoutMode::LINE) {
MeasureBase* lm = score()->last();
qreal lx = (lm->canvasPos().x() + lm->width()) * mag();
lx -= width() * .8;
// Vertical frames aren't laid out in continuous view
while (lm->isVBoxBase())
lm = lm->prev();
qreal lx = (lm->pos().x() + lm->width()) * mag() - width() * .8;
setOffset(-lx, yoffset());
}
else {
Expand Down

0 comments on commit d8fd46d

Please sign in to comment.