X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..812edc25309a5f2e7fda349d9b135b512b6f03c5:/src/gtk1/scrolwin.cpp diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index a18ec663f7..efdafd7d07 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -5,8 +5,8 @@ // Modified by: Ron Lee // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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 { @@ -895,7 +902,7 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event) yScrollOld = GetScrollPos(wxVERTICAL); int dsty; - switch ( event.KeyCode() ) + switch ( event.GetKeyCode() ) { case WXK_PAGEUP: case WXK_PRIOR: