diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-12-08 09:17:25 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-12-08 09:17:25 +0000 |
| commit | 5a3f14c370f9b9f13431b099e5b1fe6226c23c55 (patch) | |
| tree | 3086721ccd018c7e4ec563fe54288a586fda29ed /src/selection-chemistry.cpp | |
| parent | Fix version check for wheel selector. (diff) | |
| parent | implemented proper error checking (diff) | |
| download | inkscape-5a3f14c370f9b9f13431b099e5b1fe6226c23c55.tar.gz inkscape-5a3f14c370f9b9f13431b099e5b1fe6226c23c55.zip | |
Respect "relink duplicates clones" setting with linked offsets.
Patch from Adonis Papaderos.
(bzr r9944)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 6786479d6..8b917de55 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -415,6 +415,15 @@ 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++) { + gchar *source_href = SP_OFFSET(old_clone)->sourceHref; + if (source_href && source_href[0]=='#' && !strcmp(source_href+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); + } + } } } } |
