Commit 35c9e0a2 authored by Jehan's avatar Jehan

libgimpwidgets: fix setting GimpMemSizeEntry value with unit change.

This bug doesn't happen when setting value through the GUI as in such
case, the unit never changed. It happened when setting a value which
could not be properly displayed by current unit (typically smaller than
1 in this unit, or with remainder).
In such a case, we should not manually set private->shift before
gimp_int_combo_box_set_active(), or the callback was failing to
reconfigure the GtkAdjustement, in particular min and max values.

As a consequence, hitting a Preferences reset, with a GimpMemSizeEntry
in Gigabytes, it got reset to Kilobytes with the max values capped at
4096. So I realized a Reset ended me with a Tile cache size of 4096 KB
in particular, which is of course ridiculously small and would be a
problem if one doesn't notice the issue immediately.

(cherry picked from commit 0be4e5c1)
parent dcc28a1f
...@@ -259,12 +259,7 @@ gimp_memsize_entry_set_value (GimpMemsizeEntry *entry, ...@@ -259,12 +259,7 @@ gimp_memsize_entry_set_value (GimpMemsizeEntry *entry,
} }
if (shift != entry->shift) if (shift != entry->shift)
{
entry->shift = shift;
entry->value = value;
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (entry->menu), shift); gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (entry->menu), shift);
}
#if _MSC_VER < 1300 #if _MSC_VER < 1300
# define CAST (gint64) # define CAST (gint64)
......
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