diff options
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r-- | gtk/gtkscale.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 70fd4297ba..02222a08e0 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -654,15 +654,18 @@ void gtk_scale_set_value_pos (GtkScale *scale, GtkPositionType pos) { + GtkWidget *widget; + g_return_if_fail (GTK_IS_SCALE (scale)); if (scale->value_pos != pos) { scale->value_pos = pos; + widget = GTK_WIDGET (scale); _gtk_scale_clear_layout (scale); - if (GTK_WIDGET_VISIBLE (scale) && GTK_WIDGET_MAPPED (scale)) - gtk_widget_queue_resize (GTK_WIDGET (scale)); + if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget)) + gtk_widget_queue_resize (widget); g_object_notify (G_OBJECT (scale), "value-pos"); } |