- revert my last changes to ScrollBy, this temporarily bring back #2312
and the previously mentioned ResizeToFit issue. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26047 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1506,6 +1506,26 @@ BView::ScrollTo(BPoint where)
|
|||||||
// no reason to process this further if no scroll is intended.
|
// no reason to process this further if no scroll is intended.
|
||||||
if (where.x == fBounds.left && where.y == fBounds.top)
|
if (where.x == fBounds.left && where.y == fBounds.top)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// make sure scrolling is within valid bounds
|
||||||
|
if (fHorScroller) {
|
||||||
|
float min, max;
|
||||||
|
fHorScroller->GetRange(&min, &max);
|
||||||
|
|
||||||
|
if (where.x < min)
|
||||||
|
where.x = min;
|
||||||
|
else if (where.x > max)
|
||||||
|
where.x = max;
|
||||||
|
}
|
||||||
|
if (fVerScroller) {
|
||||||
|
float min, max;
|
||||||
|
fVerScroller->GetRange(&min, &max);
|
||||||
|
|
||||||
|
if (where.y < min)
|
||||||
|
where.y = min;
|
||||||
|
else if (where.y > max)
|
||||||
|
where.y = max;
|
||||||
|
}
|
||||||
|
|
||||||
_CheckLockAndSwitchCurrent();
|
_CheckLockAndSwitchCurrent();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user