summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp8
1 files changed, 8 insertions, 0 deletions
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<const gchar *> 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);