From 94e229aa446a291370bcfa06690907d8233a1793 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 12 Jul 2021 18:44:11 +0200 Subject: [PATCH] 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. --- plugins/DigitalLibrary/src/DigitalFactoryController.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/DigitalLibrary/src/DigitalFactoryController.py b/plugins/DigitalLibrary/src/DigitalFactoryController.py index a5cc2936a3..80f4d37f66 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryController.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryController.py @@ -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)