Merge branch 'master' of https://github.com/cbhaley/calibre into master

This commit is contained in:
Kovid Goyal 2020-10-17 19:06:49 +05:30
commit 5a553df561
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -898,12 +898,13 @@ class TagsView(QTreeView): # {{{
def has_unexpanded_children(self, index): def has_unexpanded_children(self, index):
if not index.isValid(): if not index.isValid():
return return False
if self.has_children(index) and not self.isExpanded(index): for r in range(self._model.rowCount(index)):
return True dex = index.child(r, 0)
for r in range(self.model().rowCount(index)): if self._model.rowCount(dex) > 0:
if self.has_unexpanded_children(index.child(r, 0)): if not self.isExpanded(dex):
return True return True
return self.has_unexpanded_children(dex)
return False return False
def collapse_menu_hovered(self, action): def collapse_menu_hovered(self, action):