diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-11-18 12:43:37 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-11-18 12:43:37 +0000 |
| commit | 945ff336805b151f03399f01c819c40f481fd45c (patch) | |
| tree | 6b75022ae4000367d83e4ffacacbd600d48cac75 /src | |
| parent | Fix for 1079971 : Symbol dialog : Drag & Drop to the canvas (diff) | |
| download | inkscape-945ff336805b151f03399f01c819c40f481fd45c.tar.gz inkscape-945ff336805b151f03399f01c819c40f481fd45c.zip | |
Fix for 275662 : Filter stays in object's css property after Filter Effect dialog removal
(bzr r11881)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 87b3e3f1a..b00dd042f 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -62,6 +62,7 @@ #include "io/sys.h" #include <iostream> +#include "selection-chemistry.h" #include <gtkmm/checkbutton.h> #include <gtkmm/colorbutton.h> @@ -1398,6 +1399,29 @@ void FilterEffectsDialog::FilterModifier::remove_filter() if(filter) { SPDocument* doc = filter->document; + // Delete all references to this filter + GSList *all = get_all_items(NULL, _desktop->currentRoot(), _desktop, false, false, true, NULL); + for (GSList *i = all; i != NULL; i = i->next) { + if (!SP_IS_ITEM(i->data)) { + continue; + } + SPItem *item = SP_ITEM(i->data); + if (!item->style) { + continue; + } + + const SPIFilter *ifilter = &(item->style->filter); + if (ifilter && ifilter->href) { + const SPObject *obj = ifilter->href->getObject(); + if (obj && obj == (SPObject *)filter) { + ::remove_filter(item, false); + } + } + } + if (all) { + g_slist_free(all); + } + //XML Tree being used directly here while it shouldn't be. sp_repr_unparent(filter->getRepr()); |
