diff options
Diffstat (limited to 'src/extension/implementation/script.cpp')
| -rw-r--r-- | src/extension/implementation/script.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index c38cc516f..12e4e809b 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -124,7 +124,7 @@ std::string Script::resolveInterpreterExecutable(const Glib::ustring &interpName // on Windows, so no extra code is necessary. if (!Glib::path_is_absolute(interpreter_path)) { std::string found_path = Glib::find_program_in_path(interpreter_path); - if (found_path.empty()) { + if (found_path.empty()) { g_critical("Script::resolveInterpreterExecutable(): failed to locate script interpreter '%s'; " "'%s' not found on PATH", interpNameArg.c_str(), interpreter_path.c_str()); } @@ -247,7 +247,7 @@ bool Script::check(Inkscape::Extension::Extension *module) while (child_repr != nullptr) { if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "script")) { script_count++; - + // check if all helper_extensions attached to this script were registered child_repr = child_repr->firstChild(); while (child_repr != nullptr) { @@ -359,7 +359,7 @@ Gtk::Widget *Script::prefs_output(Inkscape::Extension::Output *module) the header of ink_ext_. The extension is then executed using the 'execute' function - with the filename assigned and then the temporary filename. + with the filename assigned and then the temporary filename. After execution the SVG should be in the temporary file. Finally, the temporary file is opened using the SVG input module and @@ -372,6 +372,7 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, { std::list<std::string> params; module->paramListString(params); + module->set_environment(); std::string tempfilename_out; int tempfd_out = 0; @@ -447,6 +448,7 @@ void Script::save(Inkscape::Extension::Output *module, { std::list<std::string> params; module->paramListString(params); + module->set_environment(); std::string tempfilename_in; int tempfd_in = 0; @@ -545,6 +547,7 @@ void Script::effect(Inkscape::Extension::Effect *module, std::list<std::string> params; module->paramListString(params); + module->set_environment(); parent_window = module->get_execution_env()->get_working_dialog(); @@ -616,7 +619,7 @@ void Script::effect(Inkscape::Extension::Effect *module, // Getting the named view from the document generated by the extension SPNamedView *nv = sp_document_namedview(mydoc, nullptr); - + //Check if it has a default layer set up SPObject *layer = nullptr; if ( nv != nullptr) @@ -631,7 +634,7 @@ void Script::effect(Inkscape::Extension::Effect *module, } desktop->showGrids(nv->grids_visible); } - + sp_namedview_update_layers_from_document(desktop); //If that layer exists, if (layer) { |
