[pitivi] elements: Avoid 0-sized clips to become invisible



commit b41a661e5624d2d159f5069f8d8c1f950c5cb067
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sat Jan 25 19:37:58 2014 +0100

    elements: Avoid 0-sized clips to become invisible

 pitivi/timeline/elements.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 4530b06..6147e39 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -535,6 +535,8 @@ class TimelineElement(Clutter.Actor, Zoomable):
         # int(pixels_float). In that case, the rounding can add up and a pixel
         # might be lost if we ignore the start of the clip.
         size = self.nsToPixel(start + duration) - self.nsToPixel(start)
+        # Avoid elements to become invisible.
+        size = max(size, 1)
         self.set_size(size, EXPANDED_SIZE, ease)
 
     def setDragged(self, dragged):


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