diff options
author | hut <hut@lavabit.com> | 2013-02-19 07:00:09 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-19 07:01:46 +0100 |
commit | 7dcc0dd0fd56cfc5b1bb7bcc3de08f9166492d60 (patch) | |
tree | 0269921338e596222b102e488403d75fa7fc2357 /ranger | |
parent | c1760b60136b919682805ffd947b4da926654d61 (diff) | |
download | ranger-7dcc0dd0fd56cfc5b1bb7bcc3de08f9166492d60.tar.gz |
widgets.browserview: shorter implementation of f4e5ce0
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/browserview.py | 5 | ||||
-rw-r--r-- | ranger/gui/widgets/pager.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 1c6fc802..7d48eb59 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -343,7 +343,6 @@ class BrowserView(Widget, DisplayableContainer): 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() + # force clearing the image when resizing preview column + self.columns[-1].clear_image(force=True) self.resize(self.y, self.x, self.hei, self.wid) diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py index 83b2e6f9..de73ddc2 100644 --- a/ranger/gui/widgets/pager.py +++ b/ranger/gui/widgets/pager.py @@ -39,8 +39,8 @@ class Pager(Widget): self.startx = 0 self.need_redraw = True - def clear_image(self): - if self.need_clear_image: + def clear_image(self, force=False): + if force or self.need_clear_image: img_display.clear(self.x, self.y, self.wid, self.hei) self.need_clear_image = False self.image_drawn = False |