diff options
author | fvogel <fvogelnew1@free.fr> | 2019-12-24 13:22:37 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-12-24 13:22:37 (GMT) |
commit | 24d5264e2ac5971cf61105b3b3aedc000d8c8051 (patch) | |
tree | cef3691d852aae5ef3b79a77ade0b2585afb4a3a /generic | |
parent | 6be2c46561365097393960144e8ba97683718a74 (diff) | |
download | tk-24d5264e2ac5971cf61105b3b3aedc000d8c8051.zip tk-24d5264e2ac5971cf61105b3b3aedc000d8c8051.tar.gz tk-24d5264e2ac5971cf61105b3b3aedc000d8c8051.tar.bz2 |
Refine the second implementation fixing [587937fff]: Don't shuffle tag list sequence upon deletion.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvas.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 2c1038a..9f57971 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -1449,7 +1449,7 @@ CanvasWidgetCmd( tag = Tk_GetUid(Tcl_GetString(objv[2])); } FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done) { - for (i = 0; i < itemPtr->numTags; i++) { + for (i = itemPtr->numTags-1; i >= 0; i--) { if (itemPtr->tagPtr[i] == tag) { /* @@ -1462,13 +1462,6 @@ CanvasWidgetCmd( itemPtr->numTags--; /* - * Look at the same place again to deal with the case of - * successive identical tags matching the tag to delete. - */ - - i--; - - /* * There must be no break here: all tags with the same name must * be deleted. */ |