Browse Source

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.
Lipu Fei 6 years ago
parent
commit
a02bccf74d
1 changed files with 0 additions and 2 deletions
  1. 0 2
      cura/Machines/Models/NozzleModel.py

+ 0 - 2
cura/Machines/Models/NozzleModel.py

@@ -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([])