Commit 9fee677b authored by Ell's avatar Ell

libgimpwidgets: use default unit for eevl ratio quantity in size boxes

Pass the ratio quantity to be used for eevl ratio expressions in
terms of the default unit of the size box, instead of as a
dimensionless value.
parent 1e7bb051
......@@ -1286,6 +1286,7 @@ gimp_size_entry_eevl_input_callback (GtkSpinButton *spinner,
if (gsef->gse->number_of_fields == 2)
GimpSizeEntryField *other_gsef;
GimpEevlQuantity default_unit_factor;
options.ratio_expressions = TRUE;
......@@ -1302,8 +1303,11 @@ gimp_size_entry_eevl_input_callback (GtkSpinButton *spinner,
options.ratio_invert = TRUE;
options.ratio_quantity.value = other_gsef->value;
options.ratio_quantity.dimension = 0;
options.unit_resolver_proc (NULL, &default_unit_factor,;
options.ratio_quantity.value = other_gsef->value /
options.ratio_quantity.dimension = default_unit_factor.dimension;
success = gimp_eevl_evaluate (gtk_entry_get_text (GTK_ENTRY (spinner)),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment