[hamster-applet] don't draw on no data
- From: Toms Baugis <tbaugis src gnome org>
 
- To: svn-commits-list gnome org
 
- Cc: 
 
- Subject: [hamster-applet] don't draw on no data
 
- Date: Wed, 23 Dec 2009 02:27:01 +0000 (UTC)
 
commit a8e2e3020f77e0677abc93aeca6b0409399e9a9c
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Dec 23 01:46:39 2009 +0000
    don't draw on no data
 hamster/widgets/newtimeline.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/hamster/widgets/newtimeline.py b/hamster/widgets/newtimeline.py
index 516252c..8ccec5e 100644
--- a/hamster/widgets/newtimeline.py
+++ b/hamster/widgets/newtimeline.py
@@ -121,9 +121,11 @@ class NewTimeLine(graphics.Area):
         self.height = self.height - 2
         graph_x = 2
         graph_width = self.width - graph_x - 2
+
+        if not self.facts:
+            return
         
         total_minutes = stuff.duration_minutes(self.end_time - self.start_time)
-
         bar_width = float(graph_width) / len(self.tick_totals)
 
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]