From db086a01fa1c796142ebbef6d84aaaf58beb3655 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Sep 2000 16:47:56 +0000 Subject: [PATCH] fixed bug in ScrollWindow refresh logic git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/winuniv.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index be657f80b8..0a3694037b 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -658,8 +658,10 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) // and now repaint the uncovered area - // FIXME: we repaint the intersection of these rectangles twice - is - // it bad? + // FIXME: We repaint the intersection of these rectangles twice - is + // it bad? I don't think so as it is rare to scroll the window + // diagonally anyhow and so adding extra logic to compute + // rectangle intersection is probably not worth the effort wxRect rect; rect.x = ptOrigin.x + ptSource.x; @@ -670,7 +672,7 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) if ( dx < 0 ) { // refresh the area along the right border - rect.x += size.x; + rect.x += size.x + dx; rect.width = -dx; } else @@ -693,7 +695,7 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) if ( dy < 0 ) { // refresh the area along the bottom border - rect.y += size.y; + rect.y += size.y + dy; rect.height = -dy; } else