Bug 742229 - "pixels" entries get added to unit menus on each popup

_gimp_unit_store_sync_units(): don't trigger a sync of newly added
units if we encounter GIMP_UNIT_PERCENT, it has a special value that
is always larger than any other unit. All unit menus containing
"percent" were broken the same way.
This commit is contained in:
Michael Natterer 2015-01-03 17:22:50 +01:00
parent 27ec429b43
commit 9df726cbad
1 changed files with 2 additions and 2 deletions

View File

@ -923,7 +923,8 @@ _gimp_unit_store_sync_units (GimpUnitStore *store)
GIMP_UNIT_STORE_UNIT, &unit,
-1);
if (unit > private->synced_unit)
if (unit != GIMP_UNIT_PERCENT &&
unit > private->synced_unit)
{
GtkTreePath *path;
@ -933,6 +934,5 @@ _gimp_unit_store_sync_units (GimpUnitStore *store)
}
}
private->synced_unit = gimp_unit_get_number_of_units () - 1;
}