Просмотр исходного кода

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.
Ghostkeeper 5 лет назад
Родитель
Сommit
45cb34c3e4
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      cura/Machines/Models/IntentModel.py

+ 1 - 0
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: