Skip to content

Commit

Permalink
gitk: Fix "wrong # coordinates" error on reload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed May 18, 2008
1 parent 08ba820 commit 94503a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -5125,10 +5125,14 @@ proc drawvisible {} {
proc clear_display {} {
global iddrawn linesegs need_redisplay nrows_drawn
global vhighlights fhighlights nhighlights rhighlights
global linehtag linentag linedtag

allcanvs delete all
catch {unset iddrawn}
catch {unset linesegs}
catch {unset linehtag}
catch {unset linentag}
catch {unset linedtag}
catch {unset vhighlights}
catch {unset fhighlights}
catch {unset nhighlights}
Expand Down

0 comments on commit 94503a6

Please sign in to comment.