summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection-chemistry.cpp')
-rwxr-xr-x[-rw-r--r--]src/selection-chemistry.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 366ccbe33..00c08a4ca 100644..100755
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -515,6 +515,7 @@ void ObjectSet::duplicate(bool suppressDone, bool duplicateLayer)
SPUse *use = dynamic_cast<SPUse *>(old_clone);
SPOffset *offset = dynamic_cast<SPOffset *>(old_clone);
SPText *text = dynamic_cast<SPText *>(old_clone);
+ SPPath *path = dynamic_cast<SPPath *>(old_clone);
if (use) {
SPItem *orig = use->get_original();
if (!orig) // orphaned
@@ -544,6 +545,20 @@ void ObjectSet::duplicate(bool suppressDone, bool duplicateLayer)
doc->getObjectById(new_ids[i])->firstChild()->getRepr()->setAttribute("xlink:href", Glib::ustring("#") + new_ids[j]);
}
}
+ } else if (path) {
+ if (old_clone->getAttribute("inkscape:connection-start") != nullptr) {
+ const char *old_start = old_clone->getAttribute("inkscape:connection-start");
+ const char *old_end = old_clone->getAttribute("inkscape:connection-end");
+ SPObject *new_clone = doc->getObjectById(new_ids[i]);
+ for (guint j = 0; j < old_ids.size(); j++) {
+ if(old_start == Glib::ustring("#") + old_ids[j]) {
+ new_clone->getRepr()->setAttribute("inkscape:connection-start", Glib::ustring("#") + new_ids[j]);
+ }
+ if(old_end == Glib::ustring("#") + old_ids[j]) {
+ new_clone->getRepr()->setAttribute("inkscape:connection-end", Glib::ustring("#") + new_ids[j]);
+ }
+ }
+ }
}
}
}