gitk: Fix "wrong # coordinates" error on reload
This fixes the Tk error "wrong # coordinates: expected 0 or 4, got 2" that sometimes occurred when reloading. The problem was that we didn't unset the variables containing the canvas item id numbers for the displayed rows when we cleared the canvases. Thus make_secsel would think it had something to do when it didn't. Thanks to Michele Ballabio for finding a way to trigger the bug reliably. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
May 19, 2008 at 09:48 UTC
94503a66c56c935e77a8fbe3622f1f56b7134ccc
1 file changed
+4
gitk
+4
@@ -5125,10 +5125,14 @@ proc drawvisible {} {
5125
proc clear_display {} {
5126
global iddrawn linesegs need_redisplay nrows_drawn
5127
global vhighlights fhighlights nhighlights rhighlights
5128
+ global linehtag linentag linedtag
5129
5130
allcanvs delete all
5131
catch {unset iddrawn}
5132
catch {unset linesegs}
5133
+ catch {unset linehtag}
5134
+ catch {unset linentag}
5135
+ catch {unset linedtag}
5136
catch {unset vhighlights}
5137
catch {unset fhighlights}
5138
catch {unset nhighlights}