summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvLine.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-06-10 17:18:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-06-10 17:18:58 (GMT)
commit4814cb424300777296a06608bcc3041108a8480e (patch)
treed4fe391932fb10a703dea1158c6fb593f201ad2e /generic/tkCanvLine.c
parent5cad7e1240b32955c1350fcd8cf4456165f13f96 (diff)
downloadtk-4814cb424300777296a06608bcc3041108a8480e.zip
tk-4814cb424300777296a06608bcc3041108a8480e.tar.gz
tk-4814cb424300777296a06608bcc3041108a8480e.tar.bz2
[Bug 3175610]: Incomplete refresh of line items.
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r--generic/tkCanvLine.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 0a08922..747e42c 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -1031,9 +1031,12 @@ LineInsert(canvas, itemPtr, beforeThis, obj)
for(i=beforeThis; i<length; i++) {
new[i+objc] = linePtr->coordPtr[i];
}
- if(linePtr->coordPtr) ckfree((char *)linePtr->coordPtr);
+ if (linePtr->coordPtr) {
+ ckfree((char *) linePtr->coordPtr);
+ }
linePtr->coordPtr = new;
- linePtr->numPoints = (length + objc)/2;
+ length += objc;
+ linePtr->numPoints = length / 2;
if ((length>3) && (state != TK_STATE_HIDDEN)) {
/*