From f5c08cf9219d489de1885a47eaf709e97d31683a Mon Sep 17 00:00:00 2001 From: Adonis Papaderos Date: Mon, 6 Dec 2010 23:19:26 +0200 Subject: [PATCH] Make linked offsets respect "Relink duplicated clones" settings --- src/selection-chemistry.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 6786479d6..55cfe9234 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -415,6 +415,14 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone) g_free(newref); } } + } else if (SP_IS_OFFSET(old_clone)) { + for (guint j = 0; j < old_ids.size(); j++) { + if (!strcmp(SP_OFFSET(old_clone)->sourceHref+1, old_ids[j])) { + gchar *newref = g_strdup_printf("#%s", new_ids[j]); + doc->getObjectById(new_ids[i])->repr->setAttribute("xlink:href", newref); + g_free(newref); + } + } } } } -- 2.30.2