From: nicholasbishop Date: Tue, 17 Jul 2007 19:14:51 +0000 (+0000) Subject: Filter effects dialog: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d7fdd534d622a39ea2694d2e0ff3d143c0db118e;p=inkscape.git Filter effects dialog: * Enable duplicating filters (from the popup menu) --- diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index cb0a52db2..19613f1fd 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -169,10 +169,12 @@ void FilterEffectsDialog::FilterModifier::remove_filter() void FilterEffectsDialog::FilterModifier::duplicate_filter() { - SPFilter *filter = get_selected_filter(); + SPFilter* filter = get_selected_filter(); if(filter) { - //SPFilter *dupfilter = filter_duplicate(sp_desktop_document(SP_ACTIVE_DESKTOP), filter); + Inkscape::XML::Node* repr = SP_OBJECT_REPR(filter), *parent = repr->parent(); + repr = repr->duplicate(repr->document()); + parent->appendChild(repr); sp_document_done(filter->document, SP_VERB_DIALOG_FILTER_EFFECTS, _("Duplicate filter"));