Set the focus in the upper handle in the layer view instead of in the

text field. That makes it easier to release the focus by clicking in the
main view and use the arrow keys to rotate the view.
This commit is contained in:
Diego Prado Gesto 2018-08-01 08:33:47 +02:00
parent 4dd0ad6984
commit d1b6aa8c37
2 changed files with 4 additions and 4 deletions

View file

@ -67,6 +67,10 @@ Item {
activeHandle = handle activeHandle = handle
} }
// make sure the upper handle is focussed when pressing the parent handle
// needed to connect the key bindings when switching active handle
onVisibleChanged: if (visible) upperHandleLabel.forceActiveFocus()
// slider track // slider track
Rectangle { Rectangle {
id: track id: track

View file

@ -25,10 +25,6 @@ UM.PointingRectangle {
width: valueLabel.width + UM.Theme.getSize("default_margin").width width: valueLabel.width + UM.Theme.getSize("default_margin").width
visible: false visible: false
// make sure the text field is focussed when pressing the parent handle
// needed to connect the key bindings when switching active handle
onVisibleChanged: if (visible) valueLabel.forceActiveFocus()
color: UM.Theme.getColor("tool_panel_background") color: UM.Theme.getColor("tool_panel_background")
borderColor: UM.Theme.getColor("lining") borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width borderWidth: UM.Theme.getSize("default_lining").width