mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
gtkrange: Add some checks to gtk_range_set_slider_size_fixed()
Recalculate layout only if the range is already mapped and adjustment is not NULL.
This commit is contained in:
parent
65a28efc15
commit
d38bf4825a
@ -961,9 +961,12 @@ gtk_range_set_slider_size_fixed (GtkRange *range,
|
||||
{
|
||||
range->slider_size_fixed = size_fixed ? TRUE : FALSE;
|
||||
|
||||
range->need_recalc = TRUE;
|
||||
gtk_range_calc_layout (range, range->adjustment->value);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (range));
|
||||
if (range->adjustment && gtk_widget_get_mapped (GTK_WIDGET (range)))
|
||||
{
|
||||
range->need_recalc = TRUE;
|
||||
gtk_range_calc_layout (range, gtk_adjustment_get_value (range->adjustment));
|
||||
gtk_widget_queue_draw (GTK_WIDGET (range));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user