mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Don't emit signal if the favorite list didn't change.
Contributes to CURA-5682.
This commit is contained in:
parent
fe256b3562
commit
a909c8f029
1 changed files with 7 additions and 2 deletions
|
@ -199,9 +199,14 @@ class MaterialManager(QObject):
|
|||
self.materialsUpdated.emit()
|
||||
|
||||
favorites = self._application.getPreferences().getValue("cura/favorite_materials")
|
||||
favorite_added = False
|
||||
for item in favorites.split(";"):
|
||||
self._favorites.add(item)
|
||||
self.favoritesUpdated.emit()
|
||||
if item not in self._favorites:
|
||||
self._favorites.add(item)
|
||||
favorite_added = True
|
||||
|
||||
if favorite_added:
|
||||
self.favoritesUpdated.emit()
|
||||
|
||||
def __addMaterialMetadataIntoLookupTree(self, material_metadata: dict) -> None:
|
||||
material_id = material_metadata["id"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue