From 78a5a5c0267d97a3c30cc9db8b715a9b0df0d7af Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 3 Feb 2013 04:27:11 +0100 Subject: widgets.browserview: don't collapse preview when drawing images --- ranger/gui/widgets/browserview.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 7dd0a95d..0f74931e 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -241,13 +241,16 @@ class BrowserView(Widget, DisplayableContainer): return False result = not self.columns[-1].has_preview() target = self.columns[-1].target - if not result and target and target.is_file and \ - self.fm.settings.preview_script and \ - self.fm.settings.use_preview_script: - try: - result = not self.fm.previews[target.realpath]['foundpreview'] - except: - return self.old_collapse + if not result and target and target.is_file: + if target.image and self.fm.settings.preview_images: + result = False # don't collapse when drawing images + elif self.fm.settings.preview_script and \ + self.fm.settings.use_preview_script: + try: + result = not self.fm.previews[target.realpath]['foundpreview'] + except: + return self.old_collapse + self.old_collapse = result return result -- cgit 1.4.1-2-gfad0