diff options
| author | Xortex <sambut1987@gmail.com> | 2018-09-08 08:01:46 +0000 |
|---|---|---|
| committer | Xortex <sambut1987@gmail.com> | 2018-09-08 08:01:46 +0000 |
| commit | c4edcb698f1adfc0de6c00f9a2a2f535fe581455 (patch) | |
| tree | d36477d4d780aedb4a1d0c6b79123cba27cdf772 /src/selection-chemistry.cpp | |
| parent | CI/AppVeyor: Build without jemalloc (diff) | |
| download | inkscape-c4edcb698f1adfc0de6c00f9a2a2f535fe581455.tar.gz inkscape-c4edcb698f1adfc0de6c00f9a2a2f535fe581455.zip | |
fix Bug #1786269
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rwxr-xr-x[-rw-r--r--] | src/selection-chemistry.cpp | 15 |
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]); + } + } + } } } } |
