From 45cb34c3e4b1fe9beec1ded8ee67b5a1ce714787 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 5 Jul 2019 11:19:16 +0200 Subject: [PATCH] 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. --- cura/Machines/Models/IntentModel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/Machines/Models/IntentModel.py b/cura/Machines/Models/IntentModel.py index b9839aa2ad..c67544e2f6 100644 --- a/cura/Machines/Models/IntentModel.py +++ b/cura/Machines/Models/IntentModel.py @@ -33,6 +33,7 @@ class IntentModel(ListModel): if self._intent_category != new_category: self._intent_category = new_category self._intent_category_changed.emit() + self._update() @pyqtProperty(str, fset = setIntentCategory, notify = _intent_category_changed) def intentCategory(self) -> str: