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 From b11b62ddd952a15b0e3f1192c38f3ca15d1197f8 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 14 Mar 2010 18:59:51 +0100 Subject: fix pasting of LPE stacks Fixed bugs: - https://launchpad.net/bugs/290834 (bzr r9191) --- src/path-chemistry.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 50d26ba64..c44ab5bc6 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -323,8 +323,33 @@ sp_selected_path_to_curves(SPDesktop *desktop, bool interactive) } } +/** Converts the selected items to LPEItems if they are not already so; e.g. SPRects) */ +void sp_selected_to_lpeitems(SPDesktop *desktop) +{ + Inkscape::Selection *selection = sp_desktop_selection(desktop); + + if (selection->isEmpty()) { + return; + } + + bool did = false; + + GSList *selected = g_slist_copy((GSList *) selection->itemList()); + GSList *to_select = NULL; + selection->clear(); + GSList *items = g_slist_copy(selected); + + did = sp_item_list_to_curves(items, &selected, &to_select, true); + + g_slist_free (items); + selection->setReprList(to_select); + selection->addList(selected); + g_slist_free (to_select); + g_slist_free (selected); +} + bool -sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_select) +sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_select, bool skip_all_lpeitems) { bool did = false; @@ -335,6 +360,13 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec SPItem *item = SP_ITEM(items->data); SPDocument *document = item->document; + if ( skip_all_lpeitems && + SP_IS_LPE_ITEM(item) && + !SP_IS_GROUP(item) ) // also convert objects in an SPGroup when skip_all_lpeitems is set. + { + continue; + } + if (SP_IS_PATH(item) && !SP_PATH(item)->original_curve) { continue; // already a path, and no path effect } -- cgit v1.2.3