[gimp] app: mirror positions 0.0 are accepted.



commit 3c1516ea5023b77fcfbed430b1308f56737d4a26
Author: Jehan <jehan girinstud io>
Date:   Mon Apr 2 17:34:22 2018 +0200

    app: mirror positions 0.0 are accepted.
    
    This value is actually used as a special value when removing a guide to
    get rid of a symmetry, in particular it is set in the guides' callback
    gimp_mirror_guide_removed_cb() for "removed" signal.
    If not setting to 0, when adding back a symmetry, it starts with weird
    low or high values near to border (whereas when set to 0, it is reset to
    default position afterwards).

 app/core/gimpsymmetry-mirror.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpsymmetry-mirror.c b/app/core/gimpsymmetry-mirror.c
index 0c6010e..738ae5b 100644
--- a/app/core/gimpsymmetry-mirror.c
+++ b/app/core/gimpsymmetry-mirror.c
@@ -243,7 +243,7 @@ gimp_mirror_set_property (GObject      *object,
       break;
 
     case PROP_MIRROR_POSITION_X:
-      if (g_value_get_double (value) > 0.0 &&
+      if (g_value_get_double (value) >= 0.0 &&
           g_value_get_double (value) < (gdouble) gimp_image_get_width (image))
         {
           mirror->mirror_position_x = g_value_get_double (value);
@@ -264,7 +264,7 @@ gimp_mirror_set_property (GObject      *object,
       break;
 
     case PROP_MIRROR_POSITION_Y:
-      if (g_value_get_double (value) > 0.0 &&
+      if (g_value_get_double (value) >= 0.0 &&
           g_value_get_double (value) < (gdouble) gimp_image_get_height (image))
         {
           mirror->mirror_position_y = g_value_get_double (value);


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