avoid multiple emissions of the GtkAdjustment "changed" signal when configuring scrollbar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-11-10 17:10:35 +00:00
parent a16a0e092d
commit 807a3091c0
3 changed files with 11 additions and 1 deletions

View File

@@ -4878,9 +4878,12 @@ void wxWindowGTK::SetScrollbar(int orient,
GtkAdjustment* adj = gtk_range_get_adjustment(sb);
const bool wasVisible = gtk_adjustment_get_upper(adj) > gtk_adjustment_get_page_size(adj);
g_object_freeze_notify(G_OBJECT(adj));
gtk_range_set_increments(sb, 1, thumbVisible);
gtk_adjustment_set_page_size(adj, thumbVisible);
gtk_range_set_range(sb, 0, range);
g_object_thaw_notify(G_OBJECT(adj));
gtk_range_set_value(sb, pos);
m_scrollPos[dir] = gtk_range_get_value(sb);