diff options
author | dgp <dgp@noemail.net> | 2011-06-10 17:18:58 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-06-10 17:18:58 (GMT) |
commit | 2d58d451920370e2e600be07a7eea0de6f0bbbd5 (patch) | |
tree | d4fe391932fb10a703dea1158c6fb593f201ad2e /generic | |
parent | 4315a9cdd771cb058bd8dbef51a985c636d802ab (diff) | |
download | tk-2d58d451920370e2e600be07a7eea0de6f0bbbd5.zip tk-2d58d451920370e2e600be07a7eea0de6f0bbbd5.tar.gz tk-2d58d451920370e2e600be07a7eea0de6f0bbbd5.tar.bz2 |
[Bug 3175610]: Incomplete refresh of line items.
FossilOrigin-Name: 87393b6f690c2112db1e9d310a338811b19539e4
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvLine.c | 7 |
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)) { /* |