[pitivi] previewers: Pythonic thumbnail time iteration
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] previewers: Pythonic thumbnail time iteration
- Date: Wed, 25 Dec 2013 20:31:22 +0000 (UTC)
commit 589a932ce10dd792bd99f684b6e50dd40e1c9355
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Dec 8 09:33:26 2013 +0100
previewers: Pythonic thumbnail time iteration
pitivi/timeline/previewers.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 2f531ac..865d42a 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -357,8 +357,7 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
# TODO: replace with a call to utils.misc.quantize:
element_left = (element_left // thumb_duration) * thumb_duration
- current_time = element_left
- while current_time < element_right:
+ for current_time in range(element_left, element_right, thumb_duration):
thumb = Thumbnail(self.thumb_width, self.thumb_height)
thumb.set_position(Zoomable.nsToPixel(current_time), self.thumb_margin)
self.add_child(thumb)
@@ -371,7 +370,6 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
self.thumbs[current_time].set_from_gdkpixbuf(gdkpixbuf)
else:
self.wishlist.append(current_time)
- current_time += thumb_duration
self._allAnimated = False
def _get_wish(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]