summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-01 22:18:52 +0100
committerhut <hut@lavabit.com>2010-01-01 22:18:52 +0100
commita2ccfbe12af1e6a742c9ff155b6c602e93fbcd61 (patch)
treecbce3ce4ad9d8217b03e719462f945c86a322569
parentc193ba6923286a2bcad747521469526fc286fde3 (diff)
downloadranger-a2ccfbe12af1e6a742c9ff155b6c602e93fbcd61.tar.gz
browsercolumn: fixed redrawing
-rw-r--r--ranger/fsobject/directory.py2
-rw-r--r--ranger/gui/widgets/browsercolumn.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 6c9ab7b1..71afa06a 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -242,6 +242,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 				or self.old_sort != self.settings.sort \
 				or self.old_reverse != self.settings.reverse:
 			self.sort()
+			return True
+		return False
 
 	def move_to_obj(self, arg):
 		try:
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index c05473e2..5e98acf8 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -85,6 +85,13 @@ class BrowserColumn(Pager, Widget):
 			self.need_redraw = True
 			self.old_cf = self.target.pointed_obj
 
+		if type(self.target) == Directory:
+			if self.target.load_content_if_outdated():
+				self.need_redraw = True
+			else:
+				if self.target.sort_if_outdated():
+					self.need_redraw = True
+
 		if self.need_redraw:
 			self.win.erase()
 			if self.target is None:
@@ -131,9 +138,6 @@ class BrowserColumn(Pager, Widget):
 
 		self.win.move(0, 0)
 
-		if not self.target.load_content_if_outdated():
-			self.target.sort_if_outdated()
-
 		if not self.target.content_loaded:
 			maxdirsize = self.settings.max_dirsize_for_autopreview
 			if not self.target.force_load and maxdirsize is not None \