From b69f337ddb50bb8e5dc39107f75d4112b14527d1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 3 May 2017 17:01:08 +0200 Subject: [PATCH] Set machine_extruder_count in sync with defined extruders The registry checks if they are in sync and complains if they aren't. The extruder count is set back to default to 1 upon adding the machine. Contributes to issue CURA-3497. --- plugins/MachineSettingsAction/MachineSettingsAction.qml | 4 ++++ resources/definitions/custom.def.json | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index b7cf86ef58..a717ee6fa6 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -375,6 +375,10 @@ Cura.MachineAction } } currentIndex: machineExtruderCountProvider.properties.value - 1 + Component.onCompleted: + { + manager.setMachineExtruderCount(1); + } onActivated: { manager.setMachineExtruderCount(index + 1); diff --git a/resources/definitions/custom.def.json b/resources/definitions/custom.def.json index 8f15f00a0f..80e01916bb 100644 --- a/resources/definitions/custom.def.json +++ b/resources/definitions/custom.def.json @@ -22,5 +22,12 @@ "7": "custom_extruder_8" }, "first_start_actions": ["MachineSettingsAction"] + }, + "overrides": + { + "machine_extruder_count": + { + "default_value": 8 + } } }