Code

Fix self-snapping when dragging the transformation center of a selection containing...
[inkscape.git] / src / sp-symbol.cpp
index 06f8bfb493f59de4e2b07c72cf4c1b5f48cae4db..41004db6e37154db0e98ae5ae6f687d2dc2af5ae 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "libnr/nr-matrix-fns.h"
 #include "libnr/nr-matrix-ops.h"
+#include <2geom/transforms.h>
 #include "display/nr-arena-group.h"
 #include "xml/repr.h"
 #include "attributes.h"
@@ -200,7 +201,7 @@ sp_symbol_set (SPObject *object, unsigned int key, const gchar *value)
                 align = SP_ASPECT_XMIN_YMID;
             } else if (!strcmp (c, "xMidYMid")) {
                 align = SP_ASPECT_XMID_YMID;
-            } else if (!strcmp (c, "xMaxYMin")) {
+            } else if (!strcmp (c, "xMaxYMid")) {
                 align = SP_ASPECT_XMAX_YMID;
             } else if (!strcmp (c, "xMinYMax")) {
                 align = SP_ASPECT_XMIN_YMAX;
@@ -213,7 +214,7 @@ sp_symbol_set (SPObject *object, unsigned int key, const gchar *value)
             }
             clip = SP_ASPECT_MEET;
             while (*e && *e == 32) e += 1;
-            if (e) {
+            if (*e) {
                 if (!strcmp (e, "meet")) {
                     clip = SP_ASPECT_MEET;
                 } else if (!strcmp (e, "slice")) {
@@ -269,7 +270,7 @@ sp_symbol_update (SPObject *object, SPCtx *ctx, guint flags)
 
         /* Calculate child to parent transformation */
         /* Apply parent <use> translation (set up as vewport) */
-        symbol->c2p = NR::Matrix(NR::translate(rctx.vp.x0, rctx.vp.y0));
+        symbol->c2p = Geom::Matrix(Geom::Translate(rctx.vp.x0, rctx.vp.y0));
 
         if (symbol->viewBox_set) {
             double x, y, width, height;
@@ -352,7 +353,7 @@ sp_symbol_update (SPObject *object, SPCtx *ctx, guint flags)
             rctx.vp.y0 = symbol->viewBox.y0;
             rctx.vp.x1 = symbol->viewBox.x1;
             rctx.vp.y1 = symbol->viewBox.y1;
-            rctx.i2vp = NR::identity();
+            rctx.i2vp = Geom::identity();
         }
 
         /* And invoke parent method */