mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
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.
This commit is contained in:
parent
5ba3beb104
commit
51c499b08c
2 changed files with 11 additions and 2 deletions
|
@ -985,6 +985,11 @@ class MachineManager(QObject):
|
||||||
self.updateDefaultExtruder()
|
self.updateDefaultExtruder()
|
||||||
self.updateNumberExtrudersEnabled()
|
self.updateNumberExtrudersEnabled()
|
||||||
self.correctExtruderSettings()
|
self.correctExtruderSettings()
|
||||||
|
|
||||||
|
# In case this extruder is being disabled and it's the currently selected one, switch to the default extruder
|
||||||
|
if not enabled and position == ExtruderManager.getInstance().activeExtruderIndex:
|
||||||
|
ExtruderManager.getInstance().setActiveExtruderIndex(int(self._default_extruder_position))
|
||||||
|
|
||||||
# ensure that the quality profile is compatible with current combination, or choose a compatible one if available
|
# ensure that the quality profile is compatible with current combination, or choose a compatible one if available
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
self.extruderChanged.emit()
|
self.extruderChanged.emit()
|
||||||
|
|
|
@ -164,8 +164,12 @@ Column
|
||||||
onClicked: {
|
onClicked: {
|
||||||
switch (mouse.button) {
|
switch (mouse.button) {
|
||||||
case Qt.LeftButton:
|
case Qt.LeftButton:
|
||||||
forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values.
|
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
|
||||||
Cura.ExtruderManager.setActiveExtruderIndex(index);
|
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;
|
break;
|
||||||
case Qt.RightButton:
|
case Qt.RightButton:
|
||||||
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
|
extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue