From d1b6aa8c375f070f49fdf3b8c216ecf4564bf69e Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 1 Aug 2018 08:33:47 +0200 Subject: [PATCH] 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. --- plugins/SimulationView/LayerSlider.qml | 4 ++++ plugins/SimulationView/SimulationSliderLabel.qml | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/SimulationView/LayerSlider.qml b/plugins/SimulationView/LayerSlider.qml index 22f9d91340..ab752419db 100644 --- a/plugins/SimulationView/LayerSlider.qml +++ b/plugins/SimulationView/LayerSlider.qml @@ -67,6 +67,10 @@ Item { 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 Rectangle { id: track diff --git a/plugins/SimulationView/SimulationSliderLabel.qml b/plugins/SimulationView/SimulationSliderLabel.qml index 8615a382da..94167d001e 100644 --- a/plugins/SimulationView/SimulationSliderLabel.qml +++ b/plugins/SimulationView/SimulationSliderLabel.qml @@ -25,10 +25,6 @@ UM.PointingRectangle { width: valueLabel.width + UM.Theme.getSize("default_margin").width 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") borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width