From 4b3e83f876c29ec286f974e6b0fdf1c5dccf4ca9 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 27 Sep 2017 15:55:34 +0200 Subject: [PATCH] Not allowing to modify the number of extruders in multiextruder printers, except Custom FDM printers - CURA-4359 --- plugins/MachineSettingsAction/MachineSettingsAction.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.py b/plugins/MachineSettingsAction/MachineSettingsAction.py index 832e247d19..3672066678 100755 --- a/plugins/MachineSettingsAction/MachineSettingsAction.py +++ b/plugins/MachineSettingsAction/MachineSettingsAction.py @@ -112,7 +112,13 @@ class MachineSettingsAction(MachineAction): if not self._global_container_stack: return 0 - return len(self._global_container_stack.getMetaDataEntry("machine_extruder_trains")) + # If there is a printer that originally is multi-extruder, it's not allowed to change the number of extruders + # It's just allowed in case of Custom FDM printers + definition_container = self._global_container_stack.getBottom() + if definition_container.getId() == "custom": + return len(self._global_container_stack.getMetaDataEntry("machine_extruder_trains")) + return 0 + @pyqtSlot(int) def setMachineExtruderCount(self, extruder_count):