summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-05-07 17:16:47 +0000
committerJabiertxof <jtx@jtx>2017-05-07 17:16:47 +0000
commitd3deb9184f7044f930133f37654e52bc24272616 (patch)
tree2f4adc7376604af3b805846c304072c0931c4c75 /src/live_effects
parentDisable LPE from icon files for faster load. Also added a desc in the LPE ico... (diff)
downloadinkscape-d3deb9184f7044f930133f37654e52bc24272616.tar.gz
inkscape-d3deb9184f7044f930133f37654e52bc24272616.zip
Fix a bug on tapper stroke detected with Ede_123 on IRC
(bzr r15673)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect.cpp15
-rw-r--r--src/live_effects/effect.h1
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp2
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp2
-rw-r--r--src/live_effects/lpe-taperstroke.cpp1
5 files changed, 6 insertions, 15 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 6ab50b1c0..aa8987185 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -492,7 +492,7 @@ Effect::processObjects(LpeAction lpe_action)
void Effect::setCurrentShape(SPShape * shape){
if(shape){
sp_shape = shape;
- if (!(sp_curve = sp_shape->getCurve())) {
+ if (!(sp_curve = sp_shape->getCurveBeforeLPE())) {
// oops
return;
}
@@ -523,25 +523,16 @@ void Effect::doOnVisibilityToggled(SPLPEItem const* /*lpeitem*/)
void Effect::doOnApply_impl(SPLPEItem const* lpeitem)
{
sp_lpe_item = const_cast<SPLPEItem *>(lpeitem);
- sp_curve = SP_SHAPE(sp_lpe_item)->getCurve();
- pathvector_before_effect = sp_curve->get_pathvector();
SPShape * shape = dynamic_cast<SPShape *>(sp_lpe_item);
- if(shape){
- setCurrentShape(shape);
- }
+ setCurrentShape(shape);
doOnApply(lpeitem);
}
void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem)
{
sp_lpe_item = const_cast<SPLPEItem *>(lpeitem);
- //printf("(SPLPEITEM*) %p\n", sp_lpe_item);
SPShape * shape = dynamic_cast<SPShape *>(sp_lpe_item);
- if(shape){
- setCurrentShape(shape);
- sp_curve = shape->getCurve();
- pathvector_before_effect = sp_curve->get_pathvector();
- }
+ setCurrentShape(shape);
doBeforeEffect(lpeitem);
if (apply_to_clippath_and_mask && SP_IS_GROUP(sp_lpe_item)) {
sp_lpe_item->apply_to_clippath(sp_lpe_item);
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index c34c391c0..60ee8d98f 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -137,6 +137,7 @@ public:
BoolParam is_visible;
SPCurve * sp_curve;
Geom::PathVector pathvector_before_effect;
+ Geom::PathVector pathvector_after_effect;
protected:
Effect(LivePathEffectObject *lpeobject);
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index ffd2ef4cf..b54368b4e 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -199,7 +199,7 @@ LPECopyRotate::cloneD(SPObject *origin, SPObject *dest, bool root, bool reset)
SPCurve *c = NULL;
if (root) {
c = new SPCurve();
- c->set_pathvector(pathvector_before_effect);
+ c->set_pathvector(pathvector_after_effect);
} else {
c = shape->getCurve();
}
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index 4e93a2572..186b97fe3 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -216,7 +216,7 @@ LPEMirrorSymmetry::cloneD(SPObject *origin, SPObject *dest, bool live, bool root
SPCurve *c = NULL;
if (root) {
c = new SPCurve();
- c->set_pathvector(pathvector_before_effect);
+ c->set_pathvector(pathvector_after_effect);
} else {
c = shape->getCurve();
}
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp
index a40a40146..45394ae91 100644
--- a/src/live_effects/lpe-taperstroke.cpp
+++ b/src/live_effects/lpe-taperstroke.cpp
@@ -477,7 +477,6 @@ void KnotHolderEntityAttachBegin::knot_set(Geom::Point const &p, Geom::Point con
// use that object.
Geom::PathVector pathv = lpe->pathvector_before_effect;
-
Piecewise<D2<SBasis> > pwd2;
Geom::Path p_in = return_at_first_cusp(pathv[0]);
pwd2.concat(p_in.toPwSb());