Code

Remove 'default scale origin' from selector tool's preferences
[inkscape.git] / src / splivarot.cpp
index 377a060155b8ccac08c513a862772ee99aac661a..f1ce029f4f36b95c17bcb3c718e2bf9234dbd678 100644 (file)
@@ -66,6 +66,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 +579,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 +831,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);
@@ -1548,9 +1556,9 @@ sp_selected_path_simplify_items(SPDesktop *desktop,
   
   gchar *simplificationType;
   if (simplifyIndividualPaths) {
-    simplificationType = "individual paths";
+      simplificationType = _("Simplifying paths (separately):");
   } else {
-    simplificationType = "as a group";
+      simplificationType = _("Simplifying paths:");
   }
 
   bool didSomething = false;
@@ -1566,7 +1574,8 @@ sp_selected_path_simplify_items(SPDesktop *desktop,
   int pathsSimplified = 0;
   int totalPathCount  = g_slist_length(items);
   
-  desktop->disableInteraction();
+  // set "busy" cursor
+  desktop->setWaitingCursor();
   
   for (; items != NULL; items = items->next) {
       SPItem *item = (SPItem *) items->data;
@@ -1583,23 +1592,21 @@ sp_selected_path_simplify_items(SPDesktop *desktop,
           }
       }
 
-
       pathsSimplified++;
 
       if (pathsSimplified % 20 == 0) {
-        gchar *message = g_strdup_printf(_("Simplifying %s - <b>%d</b> of <b>%d</b> paths simplified..."), simplificationType, pathsSimplified, totalPathCount);
-        desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, message);
-        desktop->updateCanvasNow();
+        gchar *message = g_strdup_printf(_("%s <b>%d</b> of <b>%d</b> paths simplified..."), simplificationType, pathsSimplified, totalPathCount);
+        desktop->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, message);
       }
 
       didSomething |= sp_selected_path_simplify_item(desktop, selection, item,
                           threshold, justCoalesce, angleLimit, breakableAngles, simplifySize, modifySelection);
   }
 
-  desktop->enableInteraction();
-  
+  desktop->clearWaitingCursor();
+
   if (pathsSimplified > 20) {
-    desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strdup_printf(_("Done - <b>%d</b> paths simplified."), pathsSimplified));
+    desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, g_strdup_printf(_("<b>%d</b> paths simplified."), pathsSimplified));
   }
   
   return didSomething;