summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2171761)
raw | patch | inline | side by side (parent: 2171761)
author | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Tue, 17 Jul 2007 19:14:51 +0000 (19:14 +0000) | ||
committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Tue, 17 Jul 2007 19:14:51 +0000 (19:14 +0000) |
* Enable duplicating filters (from the popup menu)
src/ui/dialog/filter-effects-dialog.cpp | patch | blob | history |
index cb0a52db283ceaf93c1b3b54922d691309468f65..19613f1fd97a742c3d2ea52212155b74e00f5371 100644 (file)
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"));