]> git.saurik.com Git - wxWidgets.git/commitdiff
wxScrolledWindow::Scroll() no longer calls Refresh(). Adjusted listctrl to
authorKarsten Ballüder <ballueder@usa.net>
Mon, 10 May 1999 11:07:54 +0000 (11:07 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Mon, 10 May 1999 11:07:54 +0000 (11:07 +0000)
this change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp
src/generic/scrolwin.cpp

index dfd6c5d691c1bea86a4da98ced41d200790c9034..4208618f55de37fdf250c4147909bb34b8cdc216 100644 (file)
@@ -1356,15 +1356,15 @@ void wxListMainWindow::MoveToFocus( void )
     {
         int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
         if ((y > y_s) && (y+h < y_s+h_p)) return;
-        if (y-y_s < 5) Scroll( -1, (y-5-h_p/2)/m_yScroll );
-        if (y+h+5 > y_s+h_p) Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll );
+        if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); Refresh(); }
+        if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); Refresh(); }
     }
     else
     {
         int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL );
         if ((x > x_s) && (x+w < x_s+w_p)) return;
-        if (x-x_s < 5) Scroll( (x-5)/m_xScroll, -1 );
-        if (x+w-5 > x_s+w_p) Scroll( (x+w-w_p+15)/m_xScroll, -1 );
+        if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); Refresh(); }
+        if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); Refresh(); }
     }
 }
 
index 139f45ed39c9b19343dedca259e1dffb903e8e48..acce71b175ffa94a82bbf65f99b4950138c97c01 100644 (file)
@@ -456,7 +456,8 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos )
         SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE );
     }
     
-    Refresh();
+    // BAD, BAD, can cause event loops if called from OnPaint(). (KB)
+    // Refresh();
     
 #ifdef __WXMSW__
     // Necessary?