Skip to content

Commit

Permalink
Blur focus upon changing profiles, material, variant, etc.
Browse files Browse the repository at this point in the history
Otherwise the currently focussed setting gets taken along to after the switch.
  • Loading branch information
Ghostkeeper committed Nov 4, 2016
1 parent d7a6173 commit 472c3b0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/qml/SidebarHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Column
width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width
anchors.left: parent.left
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;

menu: NozzleMenu { extruderIndex: base.currentExtruderIndex }
}
Expand Down Expand Up @@ -252,6 +253,7 @@ Column
width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;

menu: MaterialMenu { extruderIndex: base.currentExtruderIndex }
}
Expand Down Expand Up @@ -301,6 +303,7 @@ Column
height: UM.Theme.getSize("setting_control").height
tooltip: Cura.MachineManager.activeQualityName
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
menu: ProfileMenu { }

Expand All @@ -319,7 +322,11 @@ Column
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
iconSource: UM.Theme.getIcon("star");

onClicked: Cura.Actions.manageProfiles.trigger()
onClicked:
{
forceActiveFocus();
Cura.Actions.manageProfiles.trigger()
}
onEntered:
{
var content = catalog.i18nc("@tooltip","Some setting values are different from the values stored in the profile.\n\nClick to open the profile manager.")
Expand Down

0 comments on commit 472c3b0

Please sign in to comment.