[gimp] app: do not snap to custom guides.



commit fa192718593946e3e34f67a37a3cf35a50f91458
Author: Jehan <jehan girinstud io>
Date:   Thu Feb 11 17:35:21 2016 +0100

    app: do not snap to custom guides.
    
    I am still not sure whether custom guides should follow snapping rules.
    Yet I could easily imagine you could want some normal guides with
    snapping and in the same time symmetry without snapping to axis of
    symmetry. So for the time being, let's disable snapping to custom guides
    all the time and see if logic could be improved later.

 app/core/gimpimage-snap.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpimage-snap.c b/app/core/gimpimage-snap.c
index c651895..5934704 100644
--- a/app/core/gimpimage-snap.c
+++ b/app/core/gimpimage-snap.c
@@ -83,6 +83,9 @@ gimp_image_snap_x (GimpImage *image,
           GimpGuide *guide    = list->data;
           gint       position = gimp_guide_get_position (guide);
 
+          if (gimp_guide_is_custom (guide))
+            continue;
+
           if (gimp_guide_get_orientation (guide) == GIMP_ORIENTATION_VERTICAL)
             {
               snapped |= gimp_image_snap_distance (x, position,
@@ -165,6 +168,9 @@ gimp_image_snap_y (GimpImage *image,
           GimpGuide *guide    = list->data;
           gint       position = gimp_guide_get_position (guide);
 
+          if (gimp_guide_is_custom (guide))
+            continue;
+
           if (gimp_guide_get_orientation (guide) == GIMP_ORIENTATION_HORIZONTAL)
             {
               snapped |= gimp_image_snap_distance (y, position,
@@ -257,6 +263,9 @@ gimp_image_snap_point (GimpImage *image,
           GimpGuide *guide    = list->data;
           gint       position = gimp_guide_get_position (guide);
 
+          if (gimp_guide_is_custom (guide))
+            continue;
+
           switch (gimp_guide_get_orientation (guide))
             {
             case GIMP_ORIENTATION_HORIZONTAL:


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