summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-11-05 16:45:28 +0000
committerjabiertxof <info@marker.es>2016-11-05 16:45:28 +0000
commit046b9d9b4d20894231127a6d00d327302ffd0474 (patch)
tree10106b36e8e58a934d2364715df1549d46c1416f /src/ui/clipboard.cpp
parentFix a bug on duplicate item with multiples LPE on it. previously the LPE beco... (diff)
downloadinkscape-046b9d9b4d20894231127a6d00d327302ffd0474.tar.gz
inkscape-046b9d9b4d20894231127a6d00d327302ffd0474.zip
Fix last commit not working, LPE are cloned on copies
(bzr r15214)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp7
1 files changed, 5 insertions, 2 deletions
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") << ";";
}
}
}