Commit 8f137cdc authored by Tomaz Canabrava's avatar Tomaz Canabrava
Browse files

Only accept numbers in FactTextEdit



All facts are numeric, atm. this means that the input should only
accept numbers. it already had the     inputMethodHints:   Qt.ImhFormattedNumbersOnly
option, but for some reason it still accepted letters and symbols.
by adding a     validator: DoubleValidator {} we limit the characters
to numbers only - and if the value is a integer, it will still work.

Tested by adding waypoints on the map & messing with the GPS coordinates.

Signed-off-by: default avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 55eeb588
...@@ -18,8 +18,8 @@ QGCTextField { ...@@ -18,8 +18,8 @@ QGCTextField {
property Fact fact: null property Fact fact: null
property string _validateString property string _validateString
// At this point all Facts are numeric // At this point all Facts are numeric
validator: DoubleValidator {}
inputMethodHints: Qt.ImhFormattedNumbersOnly inputMethodHints: Qt.ImhFormattedNumbersOnly
onEditingFinished: { onEditingFinished: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment