X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47366662dedbeeedc92e165075b638e810b608f5..377a219ac700cdf055216541a150a0f25912f373:/src/gtk1/scrolwin.cpp diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 257c6f9f22..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( (int) (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, (int) (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