Code

Improved wording for the snap indicator: gradients snap to their parent's bounding...
authordvlierop2 <dvlierop2@users.sourceforge.net>
Sun, 12 Apr 2009 13:32:00 +0000 (13:32 +0000)
committerdvlierop2 <dvlierop2@users.sourceforge.net>
Sun, 12 Apr 2009 13:32:00 +0000 (13:32 +0000)
src/display/snap-indicator.cpp
src/gradient-drag.cpp
src/snapped-point.h

index 39222d1742fe9d4740146d0eec22caffa31ca995..49433efe2228ae8522952548d523491f27bb81ef 100644 (file)
@@ -94,8 +94,8 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const p)
             case SNAPTARGET_BBOX_EDGE:
                target_name = _("bounding box side");
                break;
-            case SNAPTARGET_GRADIENT:
-               target_name = _("gradient level");
+            case SNAPTARGET_GRADIENTS_PARENT_BBOX:
+               target_name = _("bounding box");
                break;
             case SNAPTARGET_PAGE_BORDER:
                target_name = _("page border");
index 4758d27bf3472b2641f98348e874af865ff163cf..c16ed2456548e33f7adcc5a72d874835ca79b1d1 100644 (file)
@@ -609,7 +609,7 @@ gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gp
                 dist = fabs(p[Geom::Y] - dragger->parent->hor_levels[i]);
                 if (dist < snap_dist) {
                     p[Geom::Y] = dragger->parent->hor_levels[i];
-                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENT, dist, snap_dist, false, false);
+                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
                     was_snapped = true;
                     sp_knot_moveto (knot, p);
                 }
@@ -618,7 +618,7 @@ gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gp
                 dist = fabs(p[Geom::X] - dragger->parent->vert_levels[i]);
                 if (dist < snap_dist) {
                     p[Geom::X] = dragger->parent->vert_levels[i];
-                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENT, dist, snap_dist, false, false);
+                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
                     was_snapped = true;
                     sp_knot_moveto (knot, p);
                 }
index cc224452de756a092bbe7f4a5d30625c61b2f7b7..ee7c12aa7e9687d785401a7fad2a51de18ca5f0b 100644 (file)
@@ -39,7 +39,7 @@ enum SnapTargetType {
     SNAPTARGET_BBOX_EDGE,
     SNAPTARGET_BBOX_EDGE_MIDPOINT,
     SNAPTARGET_BBOX_MIDPOINT,
-    SNAPTARGET_GRADIENT,
+    SNAPTARGET_GRADIENTS_PARENT_BBOX,
     SNAPTARGET_PAGE_BORDER,
     SNAPTARGET_PAGE_CORNER,
     SNAPTARGET_CONVEX_HULL_CORNER,