Fix NozzleModel to work with new ListModel data update

CURA-6015

ListModels should not modify items directly. All ListModels should use
setItems() and the insertions/removals/modifications will be done in
setItems() itself.
This commit is contained in:
Lipu Fei 2018-12-14 13:00:03 +01:00
parent cd3a9e02d6
commit a02bccf74d

View File

@ -33,8 +33,6 @@ class NozzleModel(ListModel):
def _update(self):
Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__))
self.items.clear()
global_stack = self._machine_manager.activeMachine
if global_stack is None:
self.setItems([])