Keep m_pos in sync in SetValue in case the value_changed callback is
not called, such as when the widget is first created. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -346,6 +346,13 @@ void wxSlider::SetValue( int value )
|
|||||||
BlockScrollEvent();
|
BlockScrollEvent();
|
||||||
gtk_range_set_value(GTK_RANGE (m_widget), value);
|
gtk_range_set_value(GTK_RANGE (m_widget), value);
|
||||||
UnblockScrollEvent();
|
UnblockScrollEvent();
|
||||||
|
|
||||||
|
// keep m_pos in sync in case the value_changed callback didn't didn't
|
||||||
|
// get called, such as when the widget is first created
|
||||||
|
if (GetValue() != value)
|
||||||
|
{
|
||||||
|
m_pos = gtk_range_get_value(GTK_RANGE(m_widget));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user