summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2009-11-19 22:28:12 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2009-11-19 22:28:12 (GMT)
commit401ff069de0d9b9bb505c34cd25d0690ffd6dc3d (patch)
treeba38cd82710b47683dc7d4ff60c5c6bc9399f5a6
parent245b7b3172213b9fa7ab9e493c0a7965fe1a64a6 (diff)
downloadtk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.zip
tk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.tar.gz
tk-401ff069de0d9b9bb505c34cd25d0690ffd6dc3d.tar.bz2
[Bug 2899685]: fix the redraw logic of [imove]
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkCanvas.c11
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f089bdc..40f2fe9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-19 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+
+ * generic/tkCanvas.c: [Bug 2899685]: fix the redraw logic of [imove]
+
2009-11-19 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tcl.m4: [Patch #2883533] tcl.m4 support for Haiku OS
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);