[pitivi] mediafilespreviewer: Fix initialization



commit 45421a740484b15285edf925f5374a457595331e
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Oct 3 11:38:05 2016 +0200

    mediafilespreviewer: Fix initialization
    
    Fixes https://phabricator.freedesktop.org/T7561
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1340

 pitivi/mainwindow.py          |    2 +-
 pitivi/mediafilespreviewer.py |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 2944834..3c2cb74 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -1303,7 +1303,7 @@ class PreviewAssetWindow(Gtk.Window):
 
         self._previewer = PreviewWidget(main_window.settings, minimal=True)
         self.add(self._previewer)
-        self._previewer.previewUri(self._asset.get_id())
+        self._previewer.preview_uri(self._asset.get_id())
         self._previewer.show()
 
         self.connect("focus-out-event", self._leavePreviewCb)
diff --git a/pitivi/mediafilespreviewer.py b/pitivi/mediafilespreviewer.py
index 5bc55fa..3c38307 100644
--- a/pitivi/mediafilespreviewer.py
+++ b/pitivi/mediafilespreviewer.py
@@ -169,6 +169,8 @@ class PreviewWidget(Gtk.Grid, Loggable):
             self.bbox.remove(self.b_zoom_in)
             self.bbox.remove(self.b_zoom_out)
 
+        self.clear_preview()
+
     def update_preview_cb(self, file_chooser):
         """Previews the URI of the specified file chooser.
 
@@ -178,9 +180,9 @@ class PreviewWidget(Gtk.Grid, Loggable):
         uri = file_chooser.get_preview_uri()
         if uri is None or not uri_is_valid(uri):
             return
-        self.previewUri(uri)
+        self.preview_uri(uri)
 
-    def previewUri(self, uri):
+    def preview_uri(self, uri):
         self.log("Preview request for %s", uri)
         self.clear_preview()
         self.current_selected_uri = uri


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