From 3ac26bd5d223a040c79048530edc6bc97fd4a3ed Mon Sep 17 00:00:00 2001 From: DonLakeFlyer <don@thegagnes.com> Date: Mon, 12 Mar 2018 15:01:22 -0700 Subject: [PATCH] Set focus on button and checkbox click This forces a commit on any uncommitted TextFields --- src/QmlControls/QGCButton.qml | 2 ++ src/QmlControls/QGCCheckBox.qml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/QmlControls/QGCButton.qml b/src/QmlControls/QGCButton.qml index f9cbe88..f7adf35 100644 --- a/src/QmlControls/QGCButton.qml +++ b/src/QmlControls/QGCButton.qml @@ -6,6 +6,8 @@ import QGroundControl.Palette 1.0 import QGroundControl.ScreenTools 1.0 Button { + activeFocusOnPress: true + property bool primary: false ///< primary button for a group of buttons property real pointSize: ScreenTools.defaultFontPointSize ///< Point size for button text diff --git a/src/QmlControls/QGCCheckBox.qml b/src/QmlControls/QGCCheckBox.qml index 735138d..ed602c1 100644 --- a/src/QmlControls/QGCCheckBox.qml +++ b/src/QmlControls/QGCCheckBox.qml @@ -6,6 +6,8 @@ import QGroundControl.Palette 1.0 import QGroundControl.ScreenTools 1.0 CheckBox { + activeFocusOnPress: true + property var __qgcPal: QGCPalette { colorGroupEnabled: enabled } style: CheckBoxStyle {