diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-04-23 21:34:58 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-04-23 21:37:56 +0000 |
| commit | e254e5c6ced93403c125592237b43215bde7b0ff (patch) | |
| tree | 765903f16cd02454f1c63f421e0ce2f299dacc55 /src/ui/tools | |
| parent | Fix warings on updates (diff) | |
| download | inkscape-e254e5c6ced93403c125592237b43215bde7b0ff.tar.gz inkscape-e254e5c6ced93403c125592237b43215bde7b0ff.zip | |
Fixing LPE recalculations warnings on update
Diffstat (limited to 'src/ui/tools')
| -rw-r--r-- | src/ui/tools/arc-tool.cpp | 5 | ||||
| -rw-r--r-- | src/ui/tools/eraser-tool.cpp | 9 | ||||
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/spiral-tool.cpp | 5 | ||||
| -rw-r--r-- | src/ui/tools/star-tool.cpp | 4 |
5 files changed, 3 insertions, 24 deletions
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp index c7243302b..34b29f3bb 100644 --- a/src/ui/tools/arc-tool.cpp +++ b/src/ui/tools/arc-tool.cpp @@ -424,10 +424,7 @@ void ArcTool::finishItem() { desktop->canvas->endForcedFullRedraws(); desktop->getSelection()->set(this->arc); - if (this->arc->hasPathEffectRecursive()) { - this->arc->set_shape(); - sp_lpe_item_update_patheffect (this->arc, true, false); - } + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_ARC, _("Create ellipse")); this->arc = NULL; diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp index c95cc8b47..6d1c24f07 100644 --- a/src/ui/tools/eraser-tool.cpp +++ b/src/ui/tools/eraser-tool.cpp @@ -835,13 +835,8 @@ void EraserTool::set_to_accumulated() { selection->clear(); if ( wasSelection ) { - for (std::vector<SPItem*>::const_iterator j = remainingItems.begin(); j != remainingItems.end(); ++j){ - SPItem * item = *j; - SPLPEItem * lpeitem = dynamic_cast<SPLPEItem *>(item); - if (lpeitem->hasPathEffectRecursive()) { - sp_lpe_item_update_patheffect (lpeitem, true, false); - } - selection->add(item); + if ( !remainingItems.empty() ) { + selection->add(remainingItems.begin(), remainingItems.end()); } } } diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 974a97995..a9b3ff8f5 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -588,10 +588,6 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, sp_repr_css_attr_unref(css); return; } - SPLPEItem * lpeitem = dynamic_cast<SPLPEItem *>(item); - if (!lpeitem->hasPathEffect() && lpeitem->hasPathEffectRecursive()) { - sp_lpe_item_update_patheffect (lpeitem, true, false); - } if (dc->waiting_LPE_type != INVALID_LPE) { Effect::createAndApply(dc->waiting_LPE_type, dc->desktop->doc(), item); dc->waiting_LPE_type = INVALID_LPE; diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp index ffca6ce4a..61ee1026b 100644 --- a/src/ui/tools/spiral-tool.cpp +++ b/src/ui/tools/spiral-tool.cpp @@ -399,11 +399,6 @@ void SpiralTool::finishItem() { this->desktop->getSelection()->set(this->spiral); - if (spiral->hasPathEffectRecursive()) { - this->spiral->set_shape(); - sp_lpe_item_update_patheffect (this->spiral, true, false); - } - DocumentUndo::done(this->desktop->getDocument(), SP_VERB_CONTEXT_SPIRAL, _("Create spiral")); this->spiral = NULL; diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index 586b7df38..3a5615c3b 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -420,10 +420,6 @@ void StarTool::finishItem() { desktop->canvas->endForcedFullRedraws(); desktop->getSelection()->set(this->star); - if (this->star->hasPathEffectRecursive()) { - this->star->set_shape(); - sp_lpe_item_update_patheffect (this->star, true, false); - } DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR, _("Create star")); |
