From 18b8b842eaf73273472e3046521897437460a8dd Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 14 Mar 2007 06:19:48 +0000 Subject: [PATCH] save window geometry before running effect so that effects get correct view_center --- src/extension/implementation/script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index a244e9abb..003f1fc64 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -771,6 +771,9 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do Glib::ustring tempfilename_out= tmpname; g_free(tmpname); + SPDesktop *desktop = (SPDesktop *) doc; + sp_namedview_document_from_window(desktop); + Inkscape::Extension::save( Inkscape::Extension::db.get(SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE), doc->doc(), tempfilename_in.c_str(), FALSE, FALSE, FALSE); @@ -779,7 +782,6 @@ Script::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *do /* fixme: Should be some sort of checking here. Don't know how to do this with structs instead * of classes. */ - SPDesktop *desktop = (SPDesktop *) doc; if (desktop != NULL) { Inkscape::Util::GSListConstIterator selected = sp_desktop_selection(desktop)->itemList(); -- 2.30.2