Initialize scrollbar positions in wxGTK correctly.
The scrollbar positions stored in wxWindow::m_scrollPos were not initially correct in wxGTK because wxScrollHelper::SetScrollbars() didn't update them and only set the values of the underlying GtkAdjustments themselves. This resulted in filtering out of the first scroll event as the code (wrongly) believed that the scrollbar position hadn't changed. Fix this by setting m_scrollPos to the real scrollbar positions. Closes #12468. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,7 +30,9 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int xPos, int yPos,
|
||||
bool noRefresh)
|
||||
{
|
||||
m_win->m_scrollPos[wxWindow::ScrollDir_Horz] =
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Horz]->adjustment->value = xPos;
|
||||
m_win->m_scrollPos[wxWindow::ScrollDir_Vert] =
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Vert]->adjustment->value = yPos;
|
||||
base_type::SetScrollbars(
|
||||
pixelsPerUnitX, pixelsPerUnitY, noUnitsX, noUnitsY, xPos, yPos, noRefresh);
|
||||
|
Reference in New Issue
Block a user