SpinButton: Redraw +/- buttons after :wrap changes
authorDaniel Boles <dboles@src.gnome.org>
Wed, 14 Mar 2018 22:56:01 +0000 (22:56 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Wed, 14 Mar 2018 23:09:48 +0000 (23:09 +0000)
Otherwise, the + or - button might change sensitivity based on whether
it can be used to wrap, but without ensuring we update its state, the
ability to :wrap isn't reflected until something else triggers a draw.

https://gitlab.gnome.org/GNOME/gtk/issues/88

gtk/gtkspinbutton.c

index 8587df9582da9f603425d8e967f61fb080877b37..5a09ba8f361678eec8a726ec1663b33aafca6771 100644 (file)
@@ -2431,9 +2431,10 @@ gtk_spin_button_set_wrap (GtkSpinButton  *spin_button,
 
   if (priv->wrap != wrap)
     {
-       priv->wrap = wrap;
+      priv->wrap = wrap;
+      g_object_notify (G_OBJECT (spin_button), "wrap");
 
-       g_object_notify (G_OBJECT (spin_button), "wrap");
+      update_node_state (spin_button);
     }
 }