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



commit 9df726cbadf1946111f1fb6b330536f7195a5d03
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 3 17:22:50 2015 +0100

    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.

 libgimpwidgets/gimpunitstore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgimpwidgets/gimpunitstore.c b/libgimpwidgets/gimpunitstore.c
index db1a01d..e798599 100644
--- a/libgimpwidgets/gimpunitstore.c
+++ b/libgimpwidgets/gimpunitstore.c
@@ -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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]