Merge pull request #4089 from Ultimaker/disable_extruder_swith_to_default

Switch to default extruder if disable the active one
This commit is contained in:
Lipu Fei 2018-07-17 10:28:16 +02:00 committed by GitHub
commit 636d145d08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -164,8 +164,12 @@ Column
onClicked: {
switch (mouse.button) {
case Qt.LeftButton:
forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
Cura.ExtruderManager.setActiveExtruderIndex(index);
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
if (extruder_enabled)
{
forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
Cura.ExtruderManager.setActiveExtruderIndex(index);
}
break;
case Qt.RightButton:
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled