diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2009-11-19 22:28:12 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2009-11-19 22:28:12 (GMT) |
commit | 401ff069de0d9b9bb505c34cd25d0690ffd6dc3d (patch) | |
tree | ba38cd82710b47683dc7d4ff60c5c6bc9399f5a6 /generic/tkCanvas.c | |
parent | 245b7b3172213b9fa7ab9e493c0a7965fe1a64a6 (diff) | |
download | tk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.zip tk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.tar.gz tk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.tar.bz2 |
[Bug 2899685]: fix the redraw logic of [imove]
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r-- | generic/tkCanvas.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index f21c306..3a8ea99 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.59 2009/01/06 21:58:15 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.60 2009/11/19 22:28:12 ferrieux Exp $ */ /* #define USE_OLD_TAG_SEARCH 1 */ @@ -1184,6 +1184,7 @@ CanvasWidgetCmd( FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto doneImove) { int index; int x1,x2,y1,y2; + int dontRedraw1,dontRedraw2; /* * The TK_MOVABLE_POINTS flag should only be set for types that @@ -1210,12 +1211,16 @@ CanvasWidgetCmd( x1 = itemPtr->x1; y1 = itemPtr->y1; x2 = itemPtr->x2; y2 = itemPtr->y2; - itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; + itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; ItemDelChars(canvasPtr, itemPtr, index, index); + dontRedraw1=itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW; + + itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; ItemInsert(canvasPtr, itemPtr, index, tmpObj); + dontRedraw2=itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW; - if (!(itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW)) { + if (!(dontRedraw1 && dontRedraw2)) { Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr, x1, y1, x2, y2); EventuallyRedrawItem(canvasPtr, itemPtr); |