forked from AuroraMiddleware/gtk
inspector: Avoid overflow when editing doubles
The adjustment double properties allow values from -G_MAXDOUBLE to G_MAXDOUBLE, which leads to overflow when calculating max - min / 10. To avoid that, simply use a fixed page_size of 1.0.
This commit is contained in:
parent
747962ece2
commit
0c929b7124
@ -915,7 +915,7 @@ property_editor (GObject *object,
|
||||
G_PARAM_SPEC_DOUBLE (spec)->minimum,
|
||||
G_PARAM_SPEC_DOUBLE (spec)->maximum,
|
||||
0.1,
|
||||
MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum - G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1),
|
||||
1.0,
|
||||
0.0);
|
||||
|
||||
prop_edit = gtk_spin_button_new (adj, 0.1, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user