summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-09-20 06:28:56 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-09-20 06:28:56 (GMT)
commite24b2c07bf6ff981791c4a97a5151e599f5402f0 (patch)
tree7cb674b37416107fc489067441c3294673b5f756
parent56a4439869ecffa86bd1750586a232851f0468d1 (diff)
downloadtk-e24b2c07bf6ff981791c4a97a5151e599f5402f0.zip
tk-e24b2c07bf6ff981791c4a97a5151e599f5402f0.tar.gz
tk-e24b2c07bf6ff981791c4a97a5151e599f5402f0.tar.bz2
The same fix is needed when deleting points from a canvas line.
-rw-r--r--generic/tkCanvLine.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 0ed7348..9639e40 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -1206,6 +1206,17 @@ LineDeleteCoords(
if (last1 < length-2) {
last1 += 2;
}
+ /*
+ * Smoothed lines use splines defined differently at the two line
+ * ends and elsewhere in the line (see TkMakeBezierCurve()). Include
+ * the first and/or last splines if needed.
+ */
+ if (first1 == 2) {
+ first1 -= 2;
+ }
+ if (last1 == length - 2) {
+ last1 += 2;
+ }
}
if ((first1 >= 2) || (last1 < length-2)) {