diff --git a/libgimpwidgets/gimpsizeentry.c b/libgimpwidgets/gimpsizeentry.c index 8d9bfb1fbaaa60a3205de877c4d2e42d4aba4371..50f651b03817d076bdb4c592e5f49ffa0ce89b2d 100644 --- a/libgimpwidgets/gimpsizeentry.c +++ b/libgimpwidgets/gimpsizeentry.c @@ -1547,10 +1547,13 @@ gimp_size_entry_eevl_unit_resolver (const gchar *identifier, return TRUE; } + /* Hack to handle percent within the loop */ + if (unit == gimp_unit_percent ()) + break; + unit = gimp_unit_get_by_id (i++); - /* Hack to handle percent within the loop */ - if (unit == NULL && unit != gimp_unit_percent ()) + if (unit == NULL) unit = gimp_unit_percent (); }