diff options
author | hut <hut@lavabit.com> | 2013-02-03 04:27:11 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-03 04:28:20 +0100 |
commit | 78a5a5c0267d97a3c30cc9db8b715a9b0df0d7af (patch) | |
tree | 328f0ca47700521097dd4176423ad9e8c3e02d99 /ranger | |
parent | e7a99b5aac2dda22566be77ae81af00ca189953a (diff) | |
download | ranger-78a5a5c0267d97a3c30cc9db8b715a9b0df0d7af.tar.gz |
widgets.browserview: don't collapse preview when drawing images
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/browserview.py | 17 |
1 files 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 |