From 6f10c7f675fae8c20f24f01b7cffb861f3726e9d Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 6 Apr 2014 17:38:30 -0400 Subject: Properly allow effect stacking with knotholders (and add extra LPE functionality) (bzr r13090.1.48) --- src/live_effects/lpe-attach-path.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/live_effects/lpe-attach-path.cpp') diff --git a/src/live_effects/lpe-attach-path.cpp b/src/live_effects/lpe-attach-path.cpp index 0cceb1cb7..96372892e 100644 --- a/src/live_effects/lpe-attach-path.cpp +++ b/src/live_effects/lpe-attach-path.cpp @@ -62,15 +62,10 @@ void LPEAttachPath::resetDefaults(SPItem const * item) curve_end_previous_origin = end_path_curve_end.getOrigin(); } -void LPEAttachPath::doBeforeEffect(SPLPEItem const *lpeitem) -{ - lpe_effect = const_cast (lpeitem); -} - void LPEAttachPath::doEffect (SPCurve * curve) { std::vector this_pathv = curve->get_pathvector(); - if (lpe_effect && !this_pathv.empty()) { + if (sp_lpe_item && !this_pathv.empty()) { Geom::Path p = Geom::Path(this_pathv.front().initialPoint()); bool set_start_end = start_path_curve_end.getOrigin() != curve_start_previous_origin; @@ -79,7 +74,7 @@ void LPEAttachPath::doEffect (SPCurve * curve) if (start_path.linksToPath()) { std::vector linked_pathv = start_path.get_pathvector(); - Geom::Affine linkedtransform = start_path.getObject()->getRelativeTransform(lpe_effect); + Geom::Affine linkedtransform = start_path.getObject()->getRelativeTransform(sp_lpe_item); if ( !linked_pathv.empty() ) { @@ -132,7 +127,7 @@ void LPEAttachPath::doEffect (SPCurve * curve) if (end_path.linksToPath()) { std::vector linked_pathv = end_path.get_pathvector(); - Geom::Affine linkedtransform = end_path.getObject()->getRelativeTransform(lpe_effect); + Geom::Affine linkedtransform = end_path.getObject()->getRelativeTransform(sp_lpe_item); if ( !linked_pathv.empty() ) { -- cgit v1.2.3