Skip to content

Commit

Permalink
Merge pull request #1491 from supercollider/topic/fix-visible-origin-…
Browse files Browse the repository at this point in the history
…on-new-view

sclang: set max scroll according to req'd value
  • Loading branch information
telephon committed May 30, 2015
2 parents 39ec279 + 7d48a22 commit b3ae470
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions QtCollider/widgets/QcScrollArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ QPointF QcScrollArea::visibleOrigin() const

void QcScrollArea::setVisibleOrigin( const QPointF &pt )
{
if (horizontalScrollBar()->maximum() < pt.x())
horizontalScrollBar()->setMaximum(pt.x());
if (verticalScrollBar()->maximum() < pt.y())
verticalScrollBar()->setMaximum(pt.y());

horizontalScrollBar()->setValue( pt.x() );
verticalScrollBar()->setValue( pt.y() );
}

0 comments on commit b3ae470

Please sign in to comment.