wxScrolledWindow scrollbar update fix (patch 680427)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-07-09 23:09:09 +00:00
parent 15134cb5b1
commit 5e4196efab

View File

@@ -356,15 +356,24 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX,
if (do_refresh && !noRefresh) if (do_refresh && !noRefresh)
m_targetWindow->Refresh(TRUE, GetRect()); m_targetWindow->Refresh(TRUE, GetRect());
// TODO: check if we can use AdjustScrollbars always. #ifndef __WXUNIVERSAL__
#ifdef __WXUNIVERSAL__ // If the target is not the same as the window with the scrollbars,
AdjustScrollbars(); // then we need to update the scrollbars here, since they won't have
#else // been updated by SetVirtualSize().
// This is also done by AdjustScrollbars, above if ( m_targetWindow != m_win )
#endif // !__WXUNIVERSAL__
{
AdjustScrollbars();
}
#ifndef __WXUNIVERSAL__
else
{
// otherwise this has been done by AdjustScrollbars, above
#ifdef __WXMAC__ #ifdef __WXMAC__
m_targetWindow->MacUpdateImmediately() ; m_targetWindow->MacUpdateImmediately() ;
#endif
#endif #endif
}
#endif // !__WXUNIVERSAL__
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------