mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Ensure the control has active focus when clicking a SettingItem
This way we ensure that things update properly when for example changing infill pattern. Fixes CURA-1494
This commit is contained in:
parent
eb836bfc3f
commit
e473d7a4e9
4 changed files with 12 additions and 8 deletions
|
@ -24,9 +24,10 @@ Button {
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: definition.expanded
|
checked: definition.expanded
|
||||||
|
|
||||||
onClicked: definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key)
|
onClicked: { forceActiveFocus(); definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key) }
|
||||||
|
|
||||||
UM.SimpleButton {
|
UM.SimpleButton
|
||||||
|
{
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
|
|
||||||
visible: base.hovered || settingsButton.hovered
|
visible: base.hovered || settingsButton.hovered
|
||||||
|
@ -60,7 +61,8 @@ Button {
|
||||||
height: parent.height / 2
|
height: parent.height / 2
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
onClicked: {
|
onClicked:
|
||||||
|
{
|
||||||
base.showAllHiddenInheritedSettings()
|
base.showAllHiddenInheritedSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,11 +70,13 @@ Button {
|
||||||
hoverColor: UM.Theme.getColor("setting_control_button_hover")
|
hoverColor: UM.Theme.getColor("setting_control_button_hover")
|
||||||
iconSource: UM.Theme.getIcon("notice")
|
iconSource: UM.Theme.getIcon("notice")
|
||||||
|
|
||||||
onEntered: {
|
onEntered:
|
||||||
|
{
|
||||||
base.showTooltip(catalog.i18nc("@label","Some hidden settings use values different from their normal calculated value.\n\nClick to make these settings visible."))
|
base.showTooltip(catalog.i18nc("@label","Some hidden settings use values different from their normal calculated value.\n\nClick to make these settings visible."))
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: {
|
onExited:
|
||||||
|
{
|
||||||
base.hideTooltip();
|
base.hideTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ SettingItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: propertyProvider.setPropertyValue("value", !checked)
|
onClicked: { forceActiveFocus(); propertyProvider.setPropertyValue("value", !checked) }
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,7 @@ SettingItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: provider.setPropertyValue("value", definition.options[index].key)
|
onActivated: { forceActiveFocus(); provider.setPropertyValue("value", definition.options[index].key) }
|
||||||
onModelChanged: updateCurrentIndex();
|
onModelChanged: updateCurrentIndex();
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
|
|
|
@ -102,7 +102,7 @@ SettingItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: provider.setPropertyValue("value", extruders_model.getItem(index).index);
|
onActivated: { forceActiveFocus(); provider.setPropertyValue("value", extruders_model.getItem(index).index) };
|
||||||
onModelChanged: updateCurrentIndex();
|
onModelChanged: updateCurrentIndex();
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue