From 93284975c47e84f68221cd7681c09a1bd2eff73a Mon Sep 17 00:00:00 2001 From: gouldtj Date: Tue, 2 May 2006 05:31:42 +0000 Subject: [PATCH] r11623@tres: ted | 2006-05-01 22:17:40 -0700 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index e28015f6f..bd9b085e2 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -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 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); } /** -- 2.39.5