summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-19 06:53:46 +0100
committerhut <hut@lavabit.com>2013-02-19 06:53:46 +0100
commitf4e5ce0899c379ebebb31897b756f8eb4fa59652 (patch)
treee551a34081869850ca82be3e850f94a21297ff6b
parent798c94a66b879463a1b27596171dde743ede795b (diff)
downloadranger-f4e5ce0899c379ebebb31897b756f8eb4fa59652.tar.gz
widgets.browserview: clear image when (un)collapsing preview
-rw-r--r--ranger/gui/widgets/browserview.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 742bd9d4..1c6fc802 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -341,4 +341,9 @@ class BrowserView(Widget, DisplayableContainer):
             self.columns[-1].visible = True
 
         if self.preview and self.is_collapsed != self._collapse():
+            if (self.fm.settings.preview_images and
+                self.fm.settings.preview_files):
+                pager = self.columns[-1]
+                pager.need_clear_image = True
+                pager.clear_image()
             self.resize(self.y, self.x, self.hei, self.wid)