mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Update _favorite_ids in BaseMaterialsModel._update
And make all subclasses run its super _update as well to make sure that this gets updated for them. It's necessary for the _createMaterialItem functionality because it needs to add an is_favorite role. Contributes to issue CURA-6600.
This commit is contained in:
parent
5d76f96354
commit
ea1c99b708
4 changed files with 7 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
|
@ -27,10 +27,9 @@ class MaterialBrandsModel(BaseMaterialsModel):
|
|||
self._update()
|
||||
|
||||
def _update(self):
|
||||
super()._update()
|
||||
if not self._canUpdate():
|
||||
return
|
||||
# Get updated list of favorites
|
||||
self._favorite_ids = self._material_manager.getFavorites()
|
||||
|
||||
brand_item_list = []
|
||||
brand_group_dict = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue