• Jehan's avatar
    libgimpwidgets: fix setting GimpMemSizeEntry value with unit change. · 35c9e0a2
    Jehan authored
    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)
    35c9e0a2
gimpmemsizeentry.c 7.94 KB