From 6b8428e262524d6179788b5e99b47516822abe5c Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Fri, 9 Mar 2012 20:35:16 +0100 Subject: [PATCH] Fix behavior of __get_contained_files_count when passed file id parameter and thus fix bug causing discrepancy in behavior when (un)selecting partially selected folders(will now unselect them all the time) --- deluge/ui/console/modes/torrentdetail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py index 7b4e6c671..7e90d071b 100644 --- a/deluge/ui/console/modes/torrentdetail.py +++ b/deluge/ui/console/modes/torrentdetail.py @@ -370,7 +370,7 @@ class TorrentDetail(BaseMode, component.Component): if element[1] == idx: return self.__get_contained_files_count(file_list = element[3]) elif element[3]: - c = self.__get_contained_files_count(file_list = element[3], idx=element[1]) + c = self.__get_contained_files_count(file_list = element[3], idx=idx) if c > 0: return c else: @@ -520,8 +520,8 @@ class TorrentDetail(BaseMode, component.Component): #Not selected, select it self.__mark_tree(self.file_list, idx) elif self.marked[idx] < fc: - #Partially selected, select all contents - self.__mark_tree(self.file_list, idx) + #Partially selected, unselect all contents + self.__unmark_tree(self.file_list, idx) else: #Selected, unselect it self.__unmark_tree(self.file_list, idx)