Code

more unreffing temporary styles properly
[inkscape.git] / src / splivarot.cpp
index f2a115f43c9657f3a031e83929e1d6a76ec42281..3ee5b5d61532b010717f520ef9391c54ec06f66d 100644 (file)
@@ -23,6 +23,7 @@
 #include "svg/svg.h"
 #include "sp-path.h"
 #include "sp-shape.h"
+#include "sp-image.h"
 #include "marker.h"
 #include "enums.h"
 #include "sp-text.h"
@@ -66,6 +67,12 @@ sp_selected_path_union()
     sp_selected_path_boolop(bool_op_union, SP_VERB_SELECTION_UNION, _("Union"));
 }
 
+void
+sp_selected_path_union_skip_undo()
+{
+    sp_selected_path_boolop(bool_op_union, SP_VERB_NONE, _("Union"));
+}
+
 void
 sp_selected_path_intersect()
 {
@@ -573,7 +580,9 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
 
     g_free(transform);
 
-    sp_document_done(sp_desktop_document(desktop), verb, description);
+    if (verb != SP_VERB_NONE) {
+        sp_document_done(sp_desktop_document(desktop), verb, description);
+    }
 
     delete res;
 }
@@ -823,7 +832,7 @@ sp_selected_path_outline()
                             tr = marker_item->transform * marker->c2p * tr * transform;
 
                             if (SP_OBJECT_REPR(marker_item)) {
-                                Inkscape::XML::Node *m_repr = SP_OBJECT_REPR(marker_item)->duplicate();
+                                Inkscape::XML::Node *m_repr = SP_OBJECT_REPR(marker_item)->duplicate(xml_doc);
                                 g_repr->appendChild(m_repr);
                                 SPItem *marker_item = (SPItem *) sp_desktop_document(desktop)->getObjectByRepr(m_repr);
                                 sp_item_write_transform(marker_item, m_repr, tr);
@@ -1705,6 +1714,10 @@ Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
     {
         curve = SP_TEXT(item)->getNormalizedBpath();
     }
+    else if (SP_IS_IMAGE(item))
+    {
+        curve = sp_image_get_curve(SP_IMAGE(item));
+    }
     else
     {
         curve = NULL;