Ensure that color for support extruder selector gets updated in all cases

CURA-6144
This commit is contained in:
Jaime van Kessel 2019-02-08 10:32:54 +01:00
parent 44f986d661
commit 43b81c70db

View file

@ -123,15 +123,15 @@ Item
currentIndex: supportExtruderNr.properties.value
property string color: "#fff"
Binding
Connections
{
// We override the color property's value when the ExtruderModel changes. So we need to use an
// explicit binding here otherwise we do not handle value changes after the model changes.
target: supportExtruderCombobox
property: "color"
value: supportExtruderCombobox.currentText != "" ? supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color : ""
target: extruderModel
onModelChanged:
{
supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
}
}
onCurrentIndexChanged: supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
Binding
{
@ -302,6 +302,7 @@ Item
property var extruderModel: CuraApplication.getExtrudersModel()
UM.SettingPropertyProvider
{
id: supportEnabled