From 161e7e380bbcba5e730f256937520d7bc2974c20 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 23 Feb 2018 12:46:18 +1100 Subject: [PATCH] Fix get_num_files() to count the items in the QListWidget, not in the FileSelection QVBoxLayout widget --- onionshare_gui/file_selection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/file_selection.py index 6fee2c77..e4861694 100644 --- a/onionshare_gui/file_selection.py +++ b/onionshare_gui/file_selection.py @@ -369,7 +369,7 @@ class FileSelection(QtWidgets.QVBoxLayout): """ Returns the total number of files and folders in the list. """ - return len(range(self.count())) + return len(range(self.file_list.count())) def setFocus(self): """