mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
CURA-4400 optional_extruders cannot be set to disabled extruders anymore
This commit is contained in:
parent
c21b19a910
commit
05cd937df3
3 changed files with 24 additions and 4 deletions
|
@ -27,8 +27,19 @@ SettingItem
|
|||
|
||||
onActivated:
|
||||
{
|
||||
forceActiveFocus();
|
||||
propertyProvider.setPropertyValue("value", model.getItem(index).index);
|
||||
if (model.getItem(index).enabled)
|
||||
{
|
||||
forceActiveFocus();
|
||||
propertyProvider.setPropertyValue("value", model.getItem(index).index);
|
||||
} else
|
||||
{
|
||||
if (propertyProvider.properties.value == -1)
|
||||
{
|
||||
control.currentIndex = model.rowCount() - 1; // we know the last item is "Not overriden"
|
||||
} else {
|
||||
control.currentIndex = propertyProvider.properties.value; // revert to the old value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onActiveFocusChanged:
|
||||
|
@ -192,7 +203,14 @@ SettingItem
|
|||
{
|
||||
text: model.name
|
||||
renderType: Text.NativeRendering
|
||||
color: UM.Theme.getColor("setting_control_text")
|
||||
color:
|
||||
{
|
||||
if (model.enabled) {
|
||||
UM.Theme.getColor("setting_control_text")
|
||||
} else {
|
||||
UM.Theme.getColor("action_button_disabled_text");
|
||||
}
|
||||
}
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue