From 66419f96a41c0039f1b5ea58629f76ffa7850035 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Mon, 25 Jun 2018 22:48:50 +0200 Subject: Fix for bug 1777530 on master --- src/extension/execution-env.cpp | 3 +++ src/extension/implementation/script.cpp | 12 ------------ src/extension/prefdialog.cpp | 1 + 3 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index 9a1733eea..c4b7472af 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -194,10 +194,13 @@ ExecutionEnv::run () { createWorkingDialog(); } SPDesktop *desktop = (SPDesktop *)_doc; + Inkscape::Selection * selection = desktop->getSelection(); + selection->setBackup(); desktop->setWaitingCursor(); _effect->get_imp()->effect(_effect, _doc, _docCache); desktop->clearWaitingCursor(); _state = ExecutionEnv::COMPLETE; + selection->restoreBackup(); // _runComplete.signal(); return; } diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index f0a6ec7bf..11961458a 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -690,12 +690,6 @@ void Script::effect(Inkscape::Extension::Effect *module, if (desktop) { Inkscape::Selection * selection = desktop->getSelection(); if (selection) { - //No working dialog run once - if (!selection->isEmpty()) { - selection->setBackup(); - } else { - selection->restoreBackup(); - } params = selection->params; module->paramListString(params); selection->clear(); @@ -763,12 +757,6 @@ void Script::effect(Inkscape::Extension::Effect *module, //set the current layer desktop->setCurrentLayer(layer); } - if (desktop) { - Inkscape::Selection * selection = desktop->getSelection(); - if (selection && selection->isEmpty()) { - selection->restoreBackup(); - } - } } mydoc->release(); } diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 94456b8d4..2d1192d04 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -217,6 +217,7 @@ PrefDialog::param_timer_expire () { if (_exEnv != nullptr) { _exEnv->cancel(); _exEnv->undo(); + _exEnv->reselect(); _exEnv->run(); } -- cgit v1.2.3