From 66b40f5bd986f2802c1cc0c8ae4bab2b3eb0a950 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 18 Mar 2012 18:39:50 +0100 Subject: fork LPE on duplicating objects. (configurable, defaults to "on") Fixed bugs: - https://launchpad.net/bugs/933928 (bzr r11095) --- src/selection-chemistry.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 9b39dab10..d0fba0de5 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -376,6 +376,7 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone) std::vector new_ids; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool relink_clones = prefs->getBool("/options/relinkclonesonduplicate/value"); + const bool fork_livepatheffects = prefs->getBool("/options/forklpeonduplicate/value", true); while (reprs) { Inkscape::XML::Node *old_repr = (Inkscape::XML::Node *) reprs->data; @@ -391,6 +392,13 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone) add_ids_recursive(new_ids, new_obj); } + if (fork_livepatheffects) { + SPObject *new_obj = doc->getObjectByRepr(copy); + if (new_obj && SP_IS_LPE_ITEM(new_obj)) { + sp_lpe_item_fork_path_effects_if_necessary(SP_LPE_ITEM(new_obj), 1); + } + } + newsel = g_slist_prepend(newsel, copy); reprs = g_slist_remove(reprs, reprs->data); Inkscape::GC::release(copy); -- cgit v1.2.3