Code

fix bug #1568462 boolean operation remove mask/clip-path
authorpopolon2 <popolon2@users.sourceforge.net>
Tue, 3 Oct 2006 22:17:40 +0000 (22:17 +0000)
committerpopolon2 <popolon2@users.sourceforge.net>
Tue, 3 Oct 2006 22:17:40 +0000 (22:17 +0000)
src/splivarot.cpp

index 242cf3a24bf6e869040827f54f0725f7a1dbd75e..a0c21d23d15487bc2edbab22f8179a2ffb5b47f4 100644 (file)
@@ -432,8 +432,10 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
     }
     gint pos = repr_source->position();
     Inkscape::XML::Node *parent = sp_repr_parent(repr_source);
-    char const *id = repr_source->attribute("id");
-    char const *style = repr_source->attribute("style");
+    gchar const *id = repr_source->attribute("id");
+    gchar const *style = repr_source->attribute("style");
+    gchar const *mask = repr_source->attribute("mask");
+    gchar const *clip_path = repr_source->attribute("clip-path");
 
 
     // remove source paths
@@ -487,6 +489,11 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
 
             Inkscape::XML::Node *repr = sp_repr_new("svg:path");
             repr->setAttribute("style", style);
+            if (mask)
+                repr->setAttribute("mask", mask);
+            if (clip_path)
+                repr->setAttribute("clip-path", clip_path);
+
             repr->setAttribute("d", d);
             g_free(d);
 
@@ -528,6 +535,12 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
         Inkscape::XML::Node *repr = sp_repr_new("svg:path");
         repr->setAttribute("style", style);
 
+        if ( mask )
+            repr->setAttribute("mask", mask);
+
+        if ( clip_path )
+            repr->setAttribute("clip-path", clip_path);
+
         repr->setAttribute("d", d);
         g_free(d);