From a76b021f78bf4704900c7f57a56a9e06ceb557dd Mon Sep 17 00:00:00 2001 From: bulia byak Date: Wed, 14 Mar 2007 06:19:48 +0000 Subject: save window geometry before running effect so that effects get correct view_center (bzr r2642) --- src/extension/implementation/script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/extension/implementation/script.cpp') 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(); -- cgit v1.2.3