From 34ac54244271a679a72da82b1a5ff62be1d3c58f Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Mon, 16 Jun 2008 16:17:27 +0000 Subject: Activate automatic knotholders for LPE PointParams (bzr r5963) --- src/live_effects/effect.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 164447387..7e56023a6 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -569,6 +569,23 @@ Effect::transform_multiply(Geom::Matrix const& postmul, bool set) } } +bool +Effect::providesKnotholder() +{ + // does the effect actively provide any knotholder entities of its own? + if (kh_entity_vector.size() > 0) + return true; + + // otherwise: are there any PointParams? + for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { + if ((*p)->paramType() == Inkscape::LivePathEffect::POINT_PARAM) { + return true; + } + } + + return false; +} + } /* namespace LivePathEffect */ } /* namespace Inkscape */ -- cgit v1.2.3