X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/566d84a7c3c06956562b9f8ac364aa3bad760c10..b5a7cdc076ec7a35990b2da37a4b7b81a9cc8f85:/src/gtk1/scrolwin.cpp diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 0a5ec3f800..222c399fc3 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -325,6 +325,11 @@ void wxScrolledWindow::DoSetVirtualSize( int x, int y ) { wxPanel::DoSetVirtualSize( x, y ); AdjustScrollbars(); + +#if wxUSE_CONSTRAINTS + if (GetAutoLayout()) + Layout(); +#endif } /* @@ -379,7 +384,6 @@ void wxScrolledWindow::AdjustScrollbars() if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper ) { m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size; - m_targetWindow->ScrollWindow( (m_xScrollPosition - m_hAdjust->value) * m_xScrollPixelsPerLine, 0 ); m_xScrollPosition = (int)m_hAdjust->value; } } @@ -397,7 +401,6 @@ void wxScrolledWindow::AdjustScrollbars() if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper ) { m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size; - m_targetWindow->ScrollWindow( 0, (m_yScrollPosition - m_vAdjust->value) * m_yScrollPixelsPerLine ); m_yScrollPosition = (int)m_vAdjust->value; } } @@ -818,11 +821,6 @@ void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event)) m_targetWindow->SetVirtualSize( m_targetWindow->GetClientSize() ); SetVirtualSize( GetClientSize() ); - -#if wxUSE_CONSTRAINTS - if (GetAutoLayout()) - Layout(); -#endif } // This calls OnDraw, having adjusted the origin according to the current