Browse Source

Fix deprecation decorator breaking the getExtruder function

Jaime van Kessel 5 years ago
parent
commit
a7d419f497
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cura/Settings/MachineManager.py

+ 2 - 1
cura/Settings/MachineManager.py

@@ -986,8 +986,9 @@ class MachineManager(QObject):
         self._application.globalContainerStackChanged.emit()
         self.forceUpdateAllSettings()
 
+    # Note that this function is deprecated, but the decorators for this don't play well together!
+    # @deprecated("use Cura.MachineManager.activeMachine.extruders instead", "4.2")
     @pyqtSlot(int, result = QObject)
-    @deprecated("use Cura.MachineManager.activeMachine.extruders instead", "4.2")
     def getExtruder(self, position: int) -> Optional[ExtruderStack]:
         if self._global_container_stack:
             return self._global_container_stack.extruders.get(str(position))