diff -r d75dfc0d10f2 -r 9c21b2746218 E5Gui/E5TreeSortFilterProxyModel.py --- a/E5Gui/E5TreeSortFilterProxyModel.py Thu Mar 23 18:58:56 2017 +0100 +++ b/E5Gui/E5TreeSortFilterProxyModel.py Thu Mar 23 19:06:13 2017 +0100 @@ -44,12 +44,14 @@ return QSortFilterProxyModel.filterAcceptsRow( self, sourceRow, sourceParent) - def hasChildren(self, parent=QModelIndex()): + def hasChildren(self, parent=None): """ Public method to check, if a parent node has some children. @param parent index of the parent node (QModelIndex) @return flag indicating the presence of children (boolean) """ + if parent is None: + parent = QModelIndex() sindex = self.mapToSource(parent) return self.sourceModel().hasChildren(sindex)