From d646b8d6c7b58a3d289a9e1c4fabba77d82bea55 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 7 Feb 2008 14:15:45 +0000 Subject: [PATCH] Avoid scrolling parts of the screen that don't belong to us git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/vscroll.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generic/vscroll.cpp b/src/generic/vscroll.cpp index a7d388a9bf..7ea4ff385a 100644 --- a/src/generic/vscroll.cpp +++ b/src/generic/vscroll.cpp @@ -382,6 +382,12 @@ bool wxVScrolledWindow::ScrollToLine(size_t line) } else // overlap between the lines we showed before and should show now { + // Avoid scrolling visible parts of the screen on Mac +#ifdef __WXMAC__ + if (!IsShownOnScreen()) + Refresh(); + else +#endif ScrollWindow(0, GetLinesHeight(GetVisibleBegin(), lineFirstOld)); }