Merge branch 'master' into CURA-6793_performance

Conflicts:
	cura/Machines/MaterialManager.py -> File was deleted in Master but I changed things for the lazy loading.
	cura/Machines/Models/BaseMaterialsModel.py -> I clarified documentation on a line above a place where a timer was added in between.

Contributes to issue CURA-6793.
This commit is contained in:
Ghostkeeper 2019-10-23 09:58:08 +02:00
commit 94eb76a844
No known key found for this signature in database
GPG key ID: 59A4C0959592C05C
318 changed files with 881 additions and 2183 deletions

View file

@ -9,14 +9,14 @@ class FavoriteMaterialsModel(BaseMaterialsModel):
def __init__(self, parent = None):
super().__init__(parent)
cura.CuraApplication.CuraApplication.getInstance().getPreferences().preferenceChanged.connect(self._onFavoritesChanged)
self._update()
self._onChanged()
## Triggered when any preference changes, but only handles it when the list
# of favourites is changed.
def _onFavoritesChanged(self, preference_key: str) -> None:
if preference_key != "cura/favorite_materials":
return
self._update()
self._onChanged()
def _update(self):
if not self._canUpdate():