eric6/WebBrowser/QtHelp/QtHelpDocumentationSelectionDialog.py

changeset 7634
8c3d033e5044
parent 7360
9190402e4505
child 7781
607a6098cb44
diff -r 96382cbe1d43 -r 8c3d033e5044 eric6/WebBrowser/QtHelp/QtHelpDocumentationSelectionDialog.py
--- a/eric6/WebBrowser/QtHelp/QtHelpDocumentationSelectionDialog.py	Sat Jun 20 15:06:20 2020 +0200
+++ b/eric6/WebBrowser/QtHelp/QtHelpDocumentationSelectionDialog.py	Sat Jun 20 17:36:20 2020 +0200
@@ -168,11 +168,19 @@
         Public method to retrieve the selected help documents.
         
         @return list of QtHelp documentation sets to be installed
-        @rtype list of str
+        @rtype set of str
         """
-        documents = []
+        documents = set()
         for item in self.documentationList.selectedItems():
-            fileName = item.data(0, Qt.UserRole)
-            if fileName:
-                documents.append(fileName)
+            if item.parent() is None:
+                # it is a category item; add all files of that category
+                for childIndex in range(item.childCount()):
+                    child = item.child(childIndex)
+                    fileName = child.data(0, Qt.UserRole)
+                    if fileName:
+                        documents.add(fileName)
+            else:
+                fileName = item.data(0, Qt.UserRole)
+                if fileName:
+                    documents.add(fileName)
         return documents

eric ide

mercurial