Oh boy. I think I fixed the issue by understanding it with the right side of

my brain, while the left side is still puzzled. So it's hard to put it into
words. Basically, there was an unwanted feedback loop when applications first
scrolled vertically and then horizontally (or vice versa). Because of the
feedback effects between BView and controlling BScrollBar, and because BView
controlls both scrollbars at once, it is important not to set the scrolling
offset of an unaffected ScrollBar, since we might actually be comming from the
SetValue() function of the other scrollbar. Fixes #1913 and possibly more,
going to check up on the other scrolling related bugs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24841 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-04-06 17:59:22 +00:00
parent 205cf95ff6
commit d7aa5bb89c

View File

@ -1569,9 +1569,9 @@ BView::ScrollBy(float deltaX, float deltaY)
fBounds.OffsetBy(deltaX, deltaY);
// then set the new values of the scrollbars
if (fHorScroller)
if (fHorScroller && deltaX != 0.0)
fHorScroller->SetValue(fBounds.left);
if (fVerScroller)
if (fVerScroller && deltaY != 0.0)
fVerScroller->SetValue(fBounds.top);
}