diff options
author | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-07-16 17:26:55 +0300 |
---|---|---|
committer | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-07-16 17:26:55 +0300 |
commit | 51c499b08c333b45e7d6604d8f4e565a97aa38bb (patch) | |
tree | 7f58535e42e240fae5f885fc99eb363434064bbe /resources/qml/SidebarHeader.qml | |
parent | 5ba3beb104070a26f323c2c03c5604f21d541e70 (diff) |
When the extruder is being disabled and it is the currently selected
one, then switch to the default extruder. Also do not allow users to
click in a disabled extruder, only if they want to enable it again.
Diffstat (limited to 'resources/qml/SidebarHeader.qml')
-rw-r--r-- | resources/qml/SidebarHeader.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 02b6bef983..4e8911b3c1 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -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 |