diff --git a/mscore/continuouspanel.cpp b/mscore/continuouspanel.cpp index d1f26041a689..a0364725b89d 100644 --- a/mscore/continuouspanel.cpp +++ b/mscore/continuouspanel.cpp @@ -112,9 +112,9 @@ void ContinuousPanel::paint(const QRect& /*r*/, QPainter& p) // // Check elements at current panel position // - _offsetPanel = -(_sv->xoffset()) / _sv->mag(); + _offsetPanel = -(_sv->xoffset()) / _sv->pmag(); _rect = QRect(_offsetPanel + _width, _y, 1, _height); - //qDebug() << "width=" << _width << "_y="<< _y << "_offsetPanel=" << _offsetPanel << "_sv->xoffset()" << _sv->xoffset() << "_sv->mag()" << _sv->mag() <<"_spatium" << _spatium << "s->canvasPos().x()" << s->canvasPos().x() << "s->x()" << s->x(); + //qDebug() << "width=" << _width << "_y="<< _y << "_offsetPanel=" << _offsetPanel << "_sv->xoffset()" << _sv->xoffset() << "_sv->pmag()" << _sv->pmag() <<"_spatium" << _spatium << "s->canvasPos().x()" << s->canvasPos().x() << "s->x()" << s->x(); Page* page = _score->pages().front(); QList elementsCurrent = page->items(_rect); if (elementsCurrent.empty()) { @@ -155,11 +155,11 @@ void ContinuousPanel::paint(const QRect& /*r*/, QPainter& p) findElementWidths(elementsCurrent); // Don't show panel if staff names are visible - if (_sv->xoffset() / _sv->mag() + _xPosMeasure > 0) { + if (_sv->xoffset() / _sv->pmag() + _xPosMeasure > 0) { _visible = false; return; } - //qDebug() << "_sv->xoffset()=" <<_sv->xoffset() << " _sv->mag()="<< _sv->mag() <<" s->x=" << s->x() << " width=" << _width << " currentMeasue=" << _currentMeasure->x() << " _xPosMeasure=" << _xPosMeasure; + //qDebug() << "_sv->xoffset()=" <<_sv->xoffset() << " _sv->pmag()="<< _sv->pmag() <<" s->x=" << s->x() << " width=" << _width << " currentMeasue=" << _currentMeasure->x() << " _xPosMeasure=" << _xPosMeasure; draw(p, elementsCurrent); _visible = true; diff --git a/mscore/scoreview.cpp b/mscore/scoreview.cpp index 1419cee71b31..5f45a4acf1a9 100644 --- a/mscore/scoreview.cpp +++ b/mscore/scoreview.cpp @@ -3735,6 +3735,15 @@ qreal ScoreView::mag() const return _matrix.m11() / (mscore->physicalDotsPerInch() / DPI); } +//--------------------------------------------------------- +// pmag +//--------------------------------------------------------- + +qreal ScoreView::pmag() const + { + return _matrix.m11(); + } + //--------------------------------------------------------- // setOffset //--------------------------------------------------------- diff --git a/mscore/scoreview.h b/mscore/scoreview.h index 76f486c8af37..8c387388ccf1 100644 --- a/mscore/scoreview.h +++ b/mscore/scoreview.h @@ -376,6 +376,7 @@ class ScoreView : public QWidget, public MuseScoreView { void setDropAnchor(const QLineF&); const QTransform& matrix() const { return _matrix; } qreal mag() const; + qreal pmag() const; MagIdx magIdx() const { return _magIdx; } void setMag(MagIdx idx, double mag); qreal xoffset() const;