[pitivi] ruler.py: fix rounding error in scale text



commit 2d1684c7f9fc0554df090b5f804fa457bd5eb534
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Tue Sep 8 16:04:53 2009 -0700

    ruler.py: fix rounding error in scale text

 pitivi/ui/ruler.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/ruler.py b/pitivi/ui/ruler.py
index 1aa33ec..04b3299 100644
--- a/pitivi/ui/ruler.py
+++ b/pitivi/ui/ruler.py
@@ -308,7 +308,7 @@ class ScaleRuler(gtk.Layout, Zoomable, Loggable):
             seconds = self.pixelToNs(self.pixmap_offset)
             paintpos = float(self.border) + 2
             if offset > 0:
-                seconds += self.pixelToNs(spacing - offset)
+                seconds = seconds - (seconds % interval) + interval
                 paintpos += spacing - offset
             shaded = self.getShadedDurationWidth()
 



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