From 6f7e95101cab739967c3f8edb4e1f6b8906e3794 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 17 Nov 2010 02:34:46 +0100 Subject: core.actions: added update_preview() --- ranger/core/actions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 80eb7fd9..b52ae0ed 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -575,6 +575,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): # -------------------------- # -- Previews # -------------------------- + def update_preview(self, path): + try: + del self.previews[path] + self.ui.need_redraw = True + except: + return False + def get_preview(self, path, width, height): if self.settings.preview_script and self.settings.use_preview_script: # self.previews is a 2 dimensional dict: -- cgit 1.4.1-2-gfad0