summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/bluredge.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:55:01 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-05-09 19:42:10 +0000
commit61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778 (patch)
tree3ed5e5b78b00cf25892a3a18e118eee41cbc15ec /src/extension/internal/bluredge.cpp
parentFix typo (diff)
downloadinkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.tar.gz
inkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.zip
Start migrating 0.92 patch to master
Diffstat (limited to 'src/extension/internal/bluredge.cpp')
-rw-r--r--src/extension/internal/bluredge.cpp13
1 files changed, 12 insertions, 1 deletions
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<SPDesktop *>(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<SPDesktop *>(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<SPItem*> items(selection->items().begin(), selection->items().end());
selection->clear();