mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 12:41:07 +00:00
range: Don't duplicate work
The adjustment value being equal is checked by gtk_adjustment_set_value() and the necessity of calc_layout() is handled by the value_changed signal handler.
This commit is contained in:
parent
06150aa517
commit
c0123ae20e
@ -4012,17 +4012,10 @@ gtk_range_real_change_value (GtkRange *range,
|
||||
value = floor ((value * power) + 0.5) / power;
|
||||
}
|
||||
|
||||
if (gtk_adjustment_get_value (priv->adjustment) != value)
|
||||
{
|
||||
priv->need_recalc = TRUE;
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (range));
|
||||
|
||||
if (priv->in_drag)
|
||||
gtk_adjustment_set_value (priv->adjustment, value);
|
||||
else
|
||||
gtk_adjustment_animate_to_value (priv->adjustment, value);
|
||||
}
|
||||
if (priv->in_drag)
|
||||
gtk_adjustment_set_value (priv->adjustment, value);
|
||||
else
|
||||
gtk_adjustment_animate_to_value (priv->adjustment, value);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user