Browse Source

Remove usage of deprecated extruders property

Initially PyCharm didn't find this because it's not typed.

Done during Turbo Testing and Tooling.
Ghostkeeper 4 years ago
parent
commit
b68c3b7301
2 changed files with 1 additions and 3 deletions
  1. 1 2
      cura/Machines/Models/BaseMaterialsModel.py
  2. 0 1
      resources/qml/Toolbar.qml

+ 1 - 2
cura/Machines/Models/BaseMaterialsModel.py

@@ -178,8 +178,7 @@ class BaseMaterialsModel(ListModel):
         if global_stack is None or not self._enabled:
             return False
 
-        extruder_position = str(self._extruder_position)
-        if extruder_position not in global_stack.extruders:
+        if self._extruder_position >= len(global_stack.extruderList):
             return False
 
         return True

+ 0 - 1
resources/qml/Toolbar.qml

@@ -129,7 +129,6 @@ Item
 
             Repeater
             {
-                id: extruders
                 width: childrenRect.width
                 height: childrenRect.height
                 model: extrudersModel.items.length > 1 ? extrudersModel : 0