From 7f17e512ed7d598e3f7d6cb1074a1c13f8d6cb19 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 30 Dec 2009 21:52:44 +0100 Subject: When combining paths: clear the selection before deleting the original objects Fixed bugs: - https://launchpad.net/bugs/495483 (bzr r8927) --- src/path-chemistry.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 99ee78ade..204c82aed 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -86,12 +86,20 @@ sp_selected_path_combine(SPDesktop *desktop) SPItem *first = NULL; Inkscape::XML::Node *parent = NULL; + if (did) { + selection->clear(); + } + for (GSList *i = items; i != NULL; i = i->next) { // going from top to bottom SPItem *item = (SPItem *) i->data; if (!SP_IS_PATH(item)) continue; - did = true; + + if (!did) { + selection->clear(); + did = true; + } SPCurve *c = sp_path_get_curve_for_edit(SP_PATH(item)); if (first == NULL) { // this is the topmost path @@ -124,11 +132,7 @@ sp_selected_path_combine(SPDesktop *desktop) g_slist_free(items); if (did) { - selection->clear(); - - // delete the topmost one so that its clones don't get alerted; this object will be - // restored shortly, with the same id - SP_OBJECT(first)->deleteObject(false); + // delete the topmost. Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); -- cgit v1.2.3 From f7c60303d85e355e4e9da8e9f0a610a08c616e70 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 9 Jan 2010 22:31:50 +0100 Subject: fix regression caused by rev. 8927 (reported in LP bug #495483 by ~suv) (bzr r8961) --- src/path-chemistry.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 204c82aed..50d26ba64 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -132,6 +132,7 @@ sp_selected_path_combine(SPDesktop *desktop) g_slist_free(items); if (did) { + SP_OBJECT(first)->deleteObject(false); // delete the topmost. Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); -- cgit v1.2.3