[hamster-applet/gnome-2-32] fix strange condition when we are asked to render without knowing the fill color yet



commit 2e96a632c0db29fc498853b484bc633835362de3
Author: Toms Bauģis <toms baugis gmail com>
Date:   Thu Aug 19 12:54:43 2010 +0100

    fix strange condition when we are asked to render without knowing the fill color yet

 src/hamster/widgets/dayline.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/hamster/widgets/dayline.py b/src/hamster/widgets/dayline.py
index fe92dd9..95f3927 100644
--- a/src/hamster/widgets/dayline.py
+++ b/src/hamster/widgets/dayline.py
@@ -45,6 +45,9 @@ class Selection(graphics.Sprite):
 
 
     def on_render(self, sprite):
+        if not self.fill: # not ready yet
+            return
+
         self.graphics.rectangle(0, 0, self.width, self.height)
         self.graphics.fill(self.fill, 0.3)
 



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