add empty file if none of files in root match host's criteria

This commit is contained in:
iLLiCiTiT 2021-01-07 10:47:50 +01:00
parent 709ef29c03
commit 2b5e55b35a

View file

@ -39,6 +39,7 @@ class FilesModel(TreeModel):
"filename": "No files found.",
# Not-selectable
"enabled": False,
"date": None,
"filepath": None
})
@ -90,6 +91,9 @@ class FilesModel(TreeModel):
self.add_child(item)
if self.rowCount() == 0:
self._add_empty()
self.endResetModel()
def data(self, index, role):