hamster applet - requesting hard code freeze break (artifacts in fact tree)



Found a bug today that on rendering makes description field tag along
from last-known in case if the value is set to blank.
Like this:
http://dl.dropbox.com/u/187829/hamster/breakage.png

The patch (attached) is a oneliner.  Asking permission to commit.

Toms
From 4b40e64c536a79329adbd0cae3d17c615f3904e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toms=20Bau=C4=A3is?= <toms baugis gmail com>
Date: Fri, 24 Sep 2010 09:28:53 +0100
Subject: [PATCH] setting label to blank made previous value to be rendered instead as the drawing went away with the cache

---
 src/hamster/graphics.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/hamster/graphics.py b/src/hamster/graphics.py
index 08a4ffd..bbb5a8e 100644
--- a/src/hamster/graphics.py
+++ b/src/hamster/graphics.py
@@ -639,6 +639,7 @@ class Label(Sprite):
 
     def on_render(self, sprite):
         if not self.text:
+            self.graphics.clear()
             return
 
         self.graphics.set_color(self.color)
-- 
1.7.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]