update window before changing the scrolling position and really scrolling it to avoid redraw problems in wxUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -462,6 +462,11 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// flush all pending repaints before we change m_{x,y}ScrollPosition, as
|
||||||
|
// otherwise invalidated area could be updated incorrectly later when
|
||||||
|
// ScrollWindow() makes sure they're repainted before scrolling them
|
||||||
|
m_targetWindow->Update();
|
||||||
|
|
||||||
int orient = event.GetOrientation();
|
int orient = event.GetOrientation();
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
{
|
{
|
||||||
@@ -894,6 +899,11 @@ void wxScrollHelper::Scroll( int x_pos, int y_pos )
|
|||||||
int w = 0, h = 0;
|
int w = 0, h = 0;
|
||||||
GetTargetSize(&w, &h);
|
GetTargetSize(&w, &h);
|
||||||
|
|
||||||
|
// flush all pending repaints before we change m_{x,y}ScrollPosition, as
|
||||||
|
// otherwise invalidated area could be updated incorrectly later when
|
||||||
|
// ScrollWindow() makes sure they're repainted before scrolling them
|
||||||
|
m_targetWindow->Update();
|
||||||
|
|
||||||
if ((x_pos != -1) && (m_xScrollPixelsPerLine))
|
if ((x_pos != -1) && (m_xScrollPixelsPerLine))
|
||||||
{
|
{
|
||||||
int old_x = m_xScrollPosition;
|
int old_x = m_xScrollPosition;
|
||||||
|
Reference in New Issue
Block a user