Refresh list of intents upon changing category

The category is changed after constructing by the QML code in order to set its property.
This is now updating twice: Once for the default category and once for the final one set by QML. This is a bit inefficient. But make it work before optimising it!

Contributes to issue CURA-6597.
This commit is contained in:
Ghostkeeper 2019-07-05 11:19:16 +02:00
parent 6e373e02c0
commit 45cb34c3e4
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -33,6 +33,7 @@ class IntentModel(ListModel):
if self._intent_category != new_category: if self._intent_category != new_category:
self._intent_category = new_category self._intent_category = new_category
self._intent_category_changed.emit() self._intent_category_changed.emit()
self._update()
@pyqtProperty(str, fset = setIntentCategory, notify = _intent_category_changed) @pyqtProperty(str, fset = setIntentCategory, notify = _intent_category_changed)
def intentCategory(self) -> str: def intentCategory(self) -> str: