From 61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 3 Nov 2017 01:55:01 +0100 Subject: Start migrating 0.92 patch to master --- src/extension/internal/bluredge.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/extension/internal/bluredge.cpp') diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index f04007d00..c086405e5 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -53,7 +53,7 @@ BlurEdge::load (Inkscape::Extension::Extension */*module*/) void BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *desktop, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - Inkscape::Selection * selection = static_cast(desktop)->selection; + float width = module->get_param_float("blur-width"); int steps = module->get_param_int("num-steps"); @@ -61,6 +61,17 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View Inkscape::Preferences *prefs = Inkscape::Preferences::get(); double old_offset = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px"); + SPDesktop *deskt = static_cast(desktop); + Inkscape::Selection * selection = NULL; + if (deskt) { + selection = deskt->selection; + if (selection && !selection->params.empty()) { + selection->restoreBackup(); + if (!deskt->on_live_extension) { + selection->emptyBackup(); + } + } + } // TODO need to properly refcount the items, at least std::vector items(selection->items().begin(), selection->items().end()); selection->clear(); -- cgit v1.2.3