From d7fdd534d622a39ea2694d2e0ff3d143c0db118e Mon Sep 17 00:00:00 2001 From: nicholasbishop Date: Tue, 17 Jul 2007 19:14:51 +0000 Subject: [PATCH] Filter effects dialog: * Enable duplicating filters (from the popup menu) --- src/ui/dialog/filter-effects-dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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")); -- 2.30.2