Clear list of projects every time we load the first page

Otherwise when we refresh the project list after searching it would put the new results at the end. That's not what we want.

Contributes to issue CURA-8009.
This commit is contained in:
Ghostkeeper 2021-07-12 18:44:11 +02:00
parent 02932a1f62
commit 94e229aa44
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -211,6 +211,7 @@ class DigitalFactoryController(QObject):
:param df_projects: A list of all the Digital Factory Library projects linked to the user's account
"""
self.clear()
self.setHasMoreProjectsToLoad(self._api.hasMoreProjectsToLoad())
self._project_model.setProjects(df_projects)
self.setRetrievingProjectsStatus(RetrievalStatus.Success)