From b2598fb09fe7647fa6e698649cf78336a42c1ad1 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Wed, 18 Apr 2012 11:37:06 -0400 Subject: [PATCH] Fixed initial board update not showing --- pygo.py | 1 - widgets/gogame.py | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pygo.py b/pygo.py index 36c9fcb..e493903 100755 --- a/pygo.py +++ b/pygo.py @@ -51,7 +51,6 @@ class Pygo(): self.gogame = gogame.GoGame(goban.Goban()) self.contents.pack_start(self.gogame) self.gogame.show_all() - self.gogame.update() # Initial board draw def on_net_direct(self, widget): diff --git a/widgets/gogame.py b/widgets/gogame.py index 863dc11..11b31b7 100644 --- a/widgets/gogame.py +++ b/widgets/gogame.py @@ -120,6 +120,8 @@ class GoGame(gtk.HBox): x,y,width,height = widget.get_allocation() self.board_backbuf = gtk.gdk.Pixmap(widget.window, width, height, depth=-1) self.board_backbuf.draw_rectangle(widget.get_style().white_gc, True, 0, 0, width, height) + self.update() + return True @@ -132,11 +134,6 @@ class GoGame(gtk.HBox): return False - # fixme: rendering/updating the whole board is pretty slow. Eliminate the need to - # render the whole board when a stone is played (we need a list of modified - # locations from somewhere) - # fixme: the board doesn't get drawn initially, even though the backbuffer *should* - # have the board in it before our first expose event def update_board(self, to_update=None): print 'update'