mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Ensure that color for support extruder selector gets updated in all cases
CURA-6144
This commit is contained in:
parent
44f986d661
commit
43b81c70db
1 changed files with 8 additions and 7 deletions
|
@ -123,15 +123,15 @@ Item
|
||||||
currentIndex: supportExtruderNr.properties.value
|
currentIndex: supportExtruderNr.properties.value
|
||||||
|
|
||||||
property string color: "#fff"
|
property string color: "#fff"
|
||||||
|
Connections
|
||||||
Binding
|
|
||||||
{
|
{
|
||||||
// We override the color property's value when the ExtruderModel changes. So we need to use an
|
target: extruderModel
|
||||||
// explicit binding here otherwise we do not handle value changes after the model changes.
|
onModelChanged:
|
||||||
target: supportExtruderCombobox
|
{
|
||||||
property: "color"
|
supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
|
||||||
value: supportExtruderCombobox.currentText != "" ? supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color : ""
|
}
|
||||||
}
|
}
|
||||||
|
onCurrentIndexChanged: supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
|
||||||
|
|
||||||
Binding
|
Binding
|
||||||
{
|
{
|
||||||
|
@ -302,6 +302,7 @@ Item
|
||||||
|
|
||||||
property var extruderModel: CuraApplication.getExtrudersModel()
|
property var extruderModel: CuraApplication.getExtrudersModel()
|
||||||
|
|
||||||
|
|
||||||
UM.SettingPropertyProvider
|
UM.SettingPropertyProvider
|
||||||
{
|
{
|
||||||
id: supportEnabled
|
id: supportEnabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue