summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-07-29 16:57:41 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-07-29 16:57:41 +0000
commitc4cb799dfa98a5643fd840b06036d1030cbc8809 (patch)
tree0e2c32c5250fc1c93a192faa772cab60879026cf /src
parentSmall fixes suggested by @Ede123 (diff)
parentFix a bug pointed by CR on delete nodes in fillet/chamfer LPE (diff)
downloadinkscape-c4cb799dfa98a5643fd840b06036d1030cbc8809.tar.gz
inkscape-c4cb799dfa98a5643fd840b06036d1030cbc8809.zip
Merge gitlab.com:inkscape/inkscape
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());
}