summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/satellitesarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/parameter/satellitesarray.cpp')
-rw-r--r--src/live_effects/parameter/satellitesarray.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp
index 45a6282e0..cb7d0df8f 100644
--- a/src/live_effects/parameter/satellitesarray.cpp
+++ b/src/live_effects/parameter/satellitesarray.cpp
@@ -44,11 +44,16 @@ void SatellitesArrayParam::set_oncanvas_looks(SPKnotShapeType shape,
_knot_color = color;
}
-void SatellitesArrayParam::setPathVectorSatellites(PathVectorSatellites pathVectorSatellites)
+void SatellitesArrayParam::setPathVectorSatellites(PathVectorSatellites pathVectorSatellites, bool refresh_knots)
{
+ if (refresh_knots) {
+ clearKnotHolder(knoth);
+ }
_last_pathVectorSatellites = pathVectorSatellites;
param_set_and_write_new_value(_last_pathVectorSatellites.getSatellites());
-
+ if (refresh_knots) {
+ addKnotHolderEntities(knoth, SP_ACTIVE_DESKTOP, knoth.getItem());
+ }
}
void SatellitesArrayParam::setUseDistance(bool use_knot_distance)
@@ -214,6 +219,16 @@ void SatellitesArrayParam::param_transform_multiply(Geom::Affine const &postmul,
}
}
+void SatellitesArrayParam::clearKnotHolder(KnotHolder *knotholder)
+{
+ for (std::list<KnotHolderEntity *>::iterator i = knotholder.entity.begin(); i != knotholder.entity.end(); ++i)
+ {
+ delete (*i);
+ (*i) = NULL;
+ }
+ entity.clear(); // is this necessary?
+}
+
void SatellitesArrayParam::addKnotHolderEntities(KnotHolder *knotholder,
SPDesktop *desktop,
SPItem *item, bool mirror)