From b5b69ed38101efb51632b9c7ad4a25a5b13ca98c Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 29 Sep 2018 19:38:18 +0200 Subject: Fix for bug: #1791784 LPE path effect undo does not work --- src/object/box3d-side.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/object/box3d-side.cpp') diff --git a/src/object/box3d-side.cpp b/src/object/box3d-side.cpp index d3ea2c890..f90b3e9ff 100644 --- a/src/object/box3d-side.cpp +++ b/src/object/box3d-side.cpp @@ -194,16 +194,21 @@ void Box3DSide::set_shape() { /* Reset the shape's curve to the "original_curve" * This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/ SPCurve * before = this->getCurveBeforeLPE(); - if (before || this->hasPathEffectRecursive()) { + bool haslpe = this->hasPathEffectOnClipOrMaskRecursive(this); + if (before || haslpe) { if (c && before && before->get_pathvector() != c->get_pathvector()){ this->setCurveBeforeLPE(c); sp_lpe_item_update_patheffect(this, true, false); - } else { + } else if(haslpe) { this->setCurveBeforeLPE(c); + } else { + //This happends on undo, fix bug:#1791784 + this->setCurveInsync(c); } } else { this->setCurveInsync(c); } + if (before) { before->unref(); } -- cgit v1.2.3