[gimp/soc-2011-gimpunitentry] GimpUnitAdjustment: fix for bug that input is not applied correctly when loosing focus



commit 0dd5eab35df69021290f198fd1286eccc9e1c711
Author: Enrico SchroÌ?der <enni schroeder gmail com>
Date:   Fri Jun 10 20:54:51 2011 +0200

    GimpUnitAdjustment: fix for bug that input is not applied correctly when loosing focus
    
    Fixes a bug that part of the input string is ignored when the unit was changed and the entry looses focus

 libgimpwidgets/gimpunitadjustment.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/libgimpwidgets/gimpunitadjustment.c b/libgimpwidgets/gimpunitadjustment.c
index 9865f16..9309d1e 100644
--- a/libgimpwidgets/gimpunitadjustment.c
+++ b/libgimpwidgets/gimpunitadjustment.c
@@ -64,8 +64,9 @@ gimp_unit_adjustment_init (GimpUnitAdjustment *unitAdjustment)
   unitAdjustment->unitChanged = FALSE;
 
   /* default unit, resolution */
-  unitAdjustment->unit = DEFAULT_UNIT;
-  unitAdjustment->resolution = DEFAULT_RESOLUTION;
+  unitAdjustment->unit        = DEFAULT_UNIT;
+  unitAdjustment->resolution  = DEFAULT_RESOLUTION;
+  unitAdjustment->unitChanged = FALSE;
 }
 
 static void
@@ -142,9 +143,6 @@ gimp_unit_adjustment_convert_unit (GimpUnitAdjustment *adj, GimpUnit unit)
     adj->unit  = unit;
 
     gimp_unit_adjustment_set_value (adj, newValue);
-
-    /* emit "unit-changed" */
-    g_signal_emit(adj, GIMP_UNIT_ADJUSTMENT_GET_CLASS(adj)->sig_unit_changed_id, 0, unit);
   }
 }
 



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