No longer update all material models when favourites change

The MaterialManager.materialsUpdated signal was only called once upon init and for the rest when a favourite was added or removed. So only the FavoriteMaterialsModel would need to listen to it.
Because the MaterialManager is being deprecated, the favourite materials model now just listens to the preferences changing instead, as it was supposed to be doing anyway.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-19 17:09:16 +02:00
parent dcf7ed9969
commit 5abb03e269
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 9 additions and 3 deletions

View file

@ -34,9 +34,6 @@ class BaseMaterialsModel(ListModel):
# Update this model when switching machines
self._machine_manager.activeStackChanged.connect(self._update)
# Update this model when list of materials changes
self._material_manager.materialsUpdated.connect(self._update)
self.addRoleName(Qt.UserRole + 1, "root_material_id")
self.addRoleName(Qt.UserRole + 2, "id")