]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
added native wxMessageDialog implementation for GTK+2
[wxWidgets.git] / src / gtk / scrolwin.cpp
index ff1c2da0a007c76f80cab808290b49d593ef5b36..9a792a679e2fb89d106b26b8f73502b3e41dc66f 100644 (file)
@@ -833,12 +833,19 @@ bool wxScrolledWindow::Layout()
 // Default OnSize resets scrollbars, if any
 void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
 {
-    if( GetAutoLayout() )
+    if( GetAutoLayout() || m_targetWindow->GetAutoLayout() )
     {
         if( m_targetWindow != this )
             m_targetWindow->FitInside();
 
         FitInside();
+
+        // FIXME:  Something is really weird here...  This should be
+        // called by FitInside above (and apparently is), yet the
+        // scrollsub sample will get the scrollbar wrong if resized
+        // quickly.  This masks the bug, but is surely not the right
+        // answer at all.
+        AdjustScrollbars();
     }
     else
     {