diff -r d75dfc0d10f2 -r 9c21b2746218 UI/BrowserSortFilterProxyModel.py --- a/UI/BrowserSortFilterProxyModel.py Thu Mar 23 18:58:56 2017 +0100 +++ b/UI/BrowserSortFilterProxyModel.py Thu Mar 23 19:06:13 2017 +0100 @@ -71,7 +71,7 @@ sindex = self.mapToSource(index) return self.sourceModel().item(sindex) - def hasChildren(self, parent=QModelIndex()): + def hasChildren(self, parent=None): """ Public method to check for the presence of child items. @@ -81,6 +81,8 @@ @param parent index of parent item (QModelIndex) @return flag indicating the presence of child items (boolean) """ + if parent is None: + parent = QModelIndex() sindex = self.mapToSource(parent) return self.sourceModel().hasChildren(sindex)