From 046b9d9b4d20894231127a6d00d327302ffd0474 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 5 Nov 2016 17:45:28 +0100 Subject: Fix last commit not working, LPE are cloned on copies (bzr r15214) --- src/ui/clipboard.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui/clipboard.cpp') diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index ef00e11b3..a8e708597 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -60,6 +60,7 @@ #include "sp-mask.h" #include "sp-textpath.h" #include "sp-rect.h" +#include "sp-object.h" #include "live_effects/lpeobject.h" #include "live_effects/lpeobject-reference.h" #include "live_effects/parameter/path.h" @@ -698,8 +699,10 @@ void ClipboardManagerImpl::_copySelection(ObjectSet *selection) LivePathEffectObject *lpeobj = (*it)->lpeobject; if (lpeobj) { Inkscape::XML::Node * lpeobjcopy = _copyNode(lpeobj->getRepr(), _doc, _defs); - lpeobjcopy->setAttribute("id",lpeobj->getRepr()->attribute("id")); - os << "#" << lpeobj->getRepr()->attribute("id") << ";"; + gchar *new_conflict_id = sp_object_get_unique_id(lpeobj, lpeobj->getAttribute("id")); + lpeobjcopy->setAttribute("id", new_conflict_id); + g_free(new_conflict_id); + os << "#" << lpeobjcopy->attribute("id") << ";"; } } } -- cgit v1.2.3