mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 11:33:14 +08:00
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:
parent
6e373e02c0
commit
45cb34c3e4
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user