- 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:
Alexandre Deckner
2008-06-20 20:04:10 +00:00
parent 2fd41f637c
commit 1c4b7e9e01
+20
View File
@@ -1506,6 +1506,26 @@ BView::ScrollTo(BPoint where)
// no reason to process this further if no scroll is intended.
if (where.x == fBounds.left && where.y == fBounds.top)
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();