Code

r11623@tres: ted | 2006-05-01 22:17:40 -0700
authorgouldtj <gouldtj@users.sourceforge.net>
Tue, 2 May 2006 05:31:42 +0000 (05:31 +0000)
committergouldtj <gouldtj@users.sourceforge.net>
Tue, 2 May 2006 05:31:42 +0000 (05:31 +0000)
 Adding in passing of the view data into the autogui build so that it
 will get to the parameters appropriately.

src/extension/implementation/script.cpp

index e28015f6f57ed73c08af85cc2775a7b7a6c7c980..bd9b085e250e9a7dc6542a9d36861a07aebeb81d 100644 (file)
@@ -380,7 +380,15 @@ Script::prefs_output(Inkscape::Extension::Output *module)
 Gtk::Widget *
 Script::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *view)
 {
-    return module->autogui(NULL, NULL);
+    SPDocument * current_document = view->doc();
+
+    using Inkscape::Util::GSListConstIterator;
+    GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
+    Inkscape::XML::Node * first_select = NULL;
+    if (selected != NULL) 
+        first_select = SP_OBJECT_REPR(*selected);
+
+    return module->autogui(current_document, first_select);
 }
 
 /**