take rows instead of removing them

This commit is contained in:
Jakub Trllo 2025-02-21 15:02:00 +01:00
parent 6947680cc2
commit 66285949a5

View file

@ -53,7 +53,8 @@ class TasksQtModel(QtGui.QStandardItemModel):
self._has_content = False
self._remove_invalid_items()
root_item = self.invisibleRootItem()
root_item.removeRows(0, root_item.rowCount())
while root_item.rowCount() != 0:
root_item.takeRow(0)
def refresh(self):
"""Refresh tasks for last project and folder."""