summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-07-29 16:45:16 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-07-29 16:45:16 +0000
commit201523932d960706a6910e19ed7cc760d1463cb0 (patch)
tree048e4fe81625654d48b6d0657582a26ca8aedf26 /src
parentcmake/MSYS2: Fix fontconfig's conf.d/ not being installed (diff)
downloadinkscape-201523932d960706a6910e19ed7cc760d1463cb0.tar.gz
inkscape-201523932d960706a6910e19ed7cc760d1463cb0.zip
Fix a bug pointed by CR on delete nodes in fillet/chamfer LPE
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp6
-rw-r--r--src/live_effects/parameter/satellitesarray.cpp7
2 files changed, 7 insertions, 6 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 11298bcbe..be5979f31 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -374,13 +374,13 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
}
for (size_t i = 0; i < satellites.size(); ++i) {
for (size_t j = 0; j < satellites[i].size(); ++j) {
+ if (j >= pathv[i].size()) {
+ continue;
+ }
Geom::Curve const &curve_in = pathv[i][j];
if (satellites[i][j].is_time != flexible) {
satellites[i][j].is_time = flexible;
double amount = satellites[i][j].amount;
- if (pathv[i].size() == j) {
- continue;
- }
if (satellites[i][j].is_time) {
double time = timeAtArcLength(amount, curve_in);
satellites[i][j].amount = time;
diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp
index ce4da243e..6b50f8c09 100644
--- a/src/live_effects/parameter/satellitesarray.cpp
+++ b/src/live_effects/parameter/satellitesarray.cpp
@@ -107,8 +107,9 @@ void SatellitesArrayParam::updateCanvasIndicators(bool mirror)
if (_vector[i][j].hidden || //Ignore if hidden
(!_vector[i][j].has_mirror && mirror == true) || //Ignore if not have mirror and we are in mirror loop
_vector[i][j].amount == 0 || //no helper in 0 value
- pathv[i].size() == j || //ignore last satellite in open paths with fillet chamfer effect
- (!pathv[i].closed() && j == 0)) //ignore first satellites on open paths
+ j >= pathv[i].size() || //ignore last satellite in open paths with fillet chamfer effect
+ (!pathv[i].closed() && j == 0) || //ignore first satellites on open paths
+ pathv[i].size() == 2)
{
continue;
}
@@ -388,7 +389,7 @@ Geom::Point FilletChamferKnotHolderEntity::knot_get() const
Geom::PathVector pathv = _pparam->_last_pathvector_satellites->getPathVector();
if (satellite.hidden ||
(!pathv[path_index].closed() && curve_index == 0) ||//ignore first satellites on open paths
- pathv[path_index].size() == curve_index) //ignore last satellite in open paths with fillet chamfer effect
+ curve_index >= pathv[path_index].size())
{
return Geom::Point(Geom::infinity(), Geom::infinity());
}