mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
CURA-4870 Update the selected configuration in the UI when the
configuration in the printer changes. Modify again the hash function.
This commit is contained in:
parent
d83eb383d9
commit
d02d845d1b
4 changed files with 14 additions and 9 deletions
|
@ -13,7 +13,7 @@ Rectangle
|
|||
|
||||
property var configuration: null
|
||||
property var selected: false
|
||||
signal configurationSelected()
|
||||
signal activateConfiguration()
|
||||
|
||||
height: childrenRect.height
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
|
@ -96,7 +96,7 @@ Rectangle
|
|||
{
|
||||
id: mouse
|
||||
anchors.fill: parent
|
||||
onClicked: configurationSelected()
|
||||
onClicked: activateConfiguration()
|
||||
hoverEnabled: true
|
||||
onEntered: parent.border.color = UM.Theme.getColor("primary_hover")
|
||||
onExited: parent.border.color = "black"
|
||||
|
@ -109,10 +109,7 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: configuration
|
||||
onConfigurationChanged: {
|
||||
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
||||
}
|
||||
Component.onCompleted: {
|
||||
configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue