From d7aa5bb89cb3f5dd86412bfd9ab3a2f07dad03a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 6 Apr 2008 17:59:22 +0000 Subject: [PATCH] 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 --- src/kits/interface/View.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 873794f5a2..7fd53d1cf6 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -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); }