wxScrolledWindow scrollbar update fix (patch 680427) and MacUpdateImmediately renamed to Update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -360,15 +360,24 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX,
|
|||||||
if (do_refresh && !noRefresh)
|
if (do_refresh && !noRefresh)
|
||||||
m_targetWindow->Refresh(TRUE, GetScrollRect());
|
m_targetWindow->Refresh(TRUE, GetScrollRect());
|
||||||
|
|
||||||
// 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->Update() ;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
#endif // !__WXUNIVERSAL__
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -496,7 +505,7 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_targetWindow->MacUpdateImmediately() ;
|
m_targetWindow->Update() ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -604,7 +613,7 @@ int wxScrollHelper::CalcScrollInc(wxScrollWinEvent& event)
|
|||||||
void wxScrollHelper::AdjustScrollbars()
|
void wxScrollHelper::AdjustScrollbars()
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_targetWindow->MacUpdateImmediately();
|
m_targetWindow->Update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int w = 0, h = 0;
|
int w = 0, h = 0;
|
||||||
@@ -758,7 +767,7 @@ void wxScrollHelper::AdjustScrollbars()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_targetWindow->MacUpdateImmediately();
|
m_targetWindow->Update();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -824,7 +833,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos )
|
|||||||
((y_pos == -1) || (y_pos == m_yScrollPosition))) return;
|
((y_pos == -1) || (y_pos == m_yScrollPosition))) return;
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_targetWindow->MacUpdateImmediately();
|
m_targetWindow->Update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int w, h;
|
int w, h;
|
||||||
@@ -874,7 +883,7 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_targetWindow->MacUpdateImmediately();
|
m_targetWindow->Update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user