changeset 576:2a913d34c95a

Don't repaint the entire toolbar on counter updates
author Neil Muller <drnlmuller@gmail.com>
date Sat, 28 Nov 2009 20:37:45 +0000
parents 95c71a13468c
children 1356875ce686
files gamelib/toolbar.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/toolbar.py	Sat Nov 28 20:31:48 2009 +0000
+++ b/gamelib/toolbar.py	Sat Nov 28 20:37:45 2009 +0000
@@ -59,8 +59,9 @@
 
 def mkcountupdate(counter):
     def update_counter(self, value):
-        getattr(self, counter).update_value("%s  " % value)
-        self.repaint()
+        widget = getattr(self, counter)
+        widget.update_value("%s  " % value)
+        widget.repaint()
     return update_counter
 
 class BaseToolBar(gui.Table):