mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
adjustment: sanity-check values when setting them
It's not enough to sanitize values when starting an animation, as the adjustment can reconfigure itself while the animation runs. So as a simple way to handle this, we sanitize every value right before setting it, too. In the future we might also want to look at sanitizing start/end values of the animation. Fixes #5763
This commit is contained in:
parent
e47c076048
commit
75c47755e3
@ -434,6 +434,8 @@ adjustment_set_value (GtkAdjustment *adjustment,
|
||||
{
|
||||
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
|
||||
|
||||
value = gtk_adjustment_sanitize_value (adjustment, value);
|
||||
|
||||
if (priv->value != value)
|
||||
{
|
||||
priv->value = value;
|
||||
|
Loading…
Reference in New Issue
Block a user