summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/satellitesarray.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-06-11 15:32:56 +0000
committerjabiertxof <info@marker.es>2016-06-11 15:32:56 +0000
commit5ad260d5810f6f8bb2cdea7186d0766091ad9b54 (patch)
tree863aa5e6139a22b09a7dea8bb41f4a81a35d5694 /src/live_effects/parameter/satellitesarray.cpp
parentRename branch (diff)
downloadinkscape-5ad260d5810f6f8bb2cdea7186d0766091ad9b54.tar.gz
inkscape-5ad260d5810f6f8bb2cdea7186d0766091ad9b54.zip
Fixing satellites bug on erase
(bzr r13645.1.146)
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)