Browse Source

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: Tomaz Canabrava <tomaz.canabrava@intel.com>
QGC4.4
Tomaz Canabrava 9 years ago
parent
commit
8f137cdc57
  1. 2
      src/FactSystem/FactControls/FactTextField.qml

2
src/FactSystem/FactControls/FactTextField.qml

@ -18,8 +18,8 @@ QGCTextField { @@ -18,8 +18,8 @@ QGCTextField {
property Fact fact: null
property string _validateString
// At this point all Facts are numeric
validator: DoubleValidator {}
inputMethodHints: Qt.ImhFormattedNumbersOnly
onEditingFinished: {

Loading…
Cancel
Save