Skip to content

Commit

Permalink
Merge pull request #1415 from MarcSabatella/37676-score-jump
Browse files Browse the repository at this point in the history
fix #32866: score jumping issues
  • Loading branch information
lasconic committed Oct 31, 2014
2 parents f4b9318 + 4b40c8d commit 85b4130
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions mscore/scoreview.cpp
Expand Up @@ -1369,7 +1369,7 @@ void ScoreView::moveCursor(int tick)

_cursor->setRect(QRectF(x, y, w, h));
update(_matrix.mapRect(_cursor->rect()).toRect().adjusted(-1,-1,1,1));
if (mscore->panDuringPlayback())
if (mscore->state() == ScoreState::STATE_PLAY && mscore->panDuringPlayback())
adjustCanvasPosition(measure, true);
}

Expand Down Expand Up @@ -3634,6 +3634,9 @@ void ScoreView::pageEnd()

void ScoreView::adjustCanvasPosition(const Element* el, bool playBack)
{
if (this != mscore->currentScoreView())
return;

if (score()->layoutMode() == LayoutMode::LINE) {
if (!el)
return;
Expand Down Expand Up @@ -3750,10 +3753,11 @@ void ScoreView::adjustCanvasPosition(const Element* el, bool playBack)
showRect.setY(p.y());
showRect.setHeight(el->height());
}
else {
// let user control height
// showRect.setY(r.y());
// showRect.setHeight(1);
else if (sys->page()->systems()->size() == 1) {
// otherwise, just keep current vertical position if possible
// see issue #7724
showRect.setY(r.y());
showRect.setHeight(r.height());
}
}

Expand Down Expand Up @@ -5571,6 +5575,8 @@ Element* ScoreView::elementNear(QPointF p)

void ScoreView::posChanged(POS pos, unsigned tick)
{
if (this != mscore->currentScoreView())
return;
switch (pos) {
case POS::CURRENT:
if (noteEntryMode())
Expand Down

0 comments on commit 85b4130

Please sign in to comment.