Code

Fixed bug in filter effects dialog; incorrect desktop was being used with multiple...
authornicholasbishop <nicholasbishop@users.sourceforge.net>
Thu, 17 Jan 2008 19:21:31 +0000 (19:21 +0000)
committernicholasbishop <nicholasbishop@users.sourceforge.net>
Thu, 17 Jan 2008 19:21:31 +0000 (19:21 +0000)
src/ui/dialog/filter-effects-dialog.cpp

index 06275bf1be685826d84c621264687d14d231d472..2073a3ea43105ef97afd8f6fe9288e07003f9d57 100644 (file)
@@ -944,8 +944,6 @@ FilterEffectsDialog::FilterModifier::~FilterModifier()
 
 void FilterEffectsDialog::FilterModifier::on_activate_desktop(Application*, SPDesktop* desktop, FilterModifier* me)
 {
-    me->update_filters();
-
     me->_doc_replaced.disconnect();
     me->_doc_replaced = desktop->connectDocumentReplaced(
         sigc::mem_fun(me, &FilterModifier::on_document_replaced));
@@ -954,6 +952,10 @@ void FilterEffectsDialog::FilterModifier::on_activate_desktop(Application*, SPDe
     me->_resource_changed =
         sp_document_resources_changed_connect(sp_desktop_document(desktop), "filter",
                                               sigc::mem_fun(me, &FilterModifier::update_filters));
+
+    me->_dialog.setDesktop(desktop);
+
+    me->update_filters();
 }