diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-04 10:03:41 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-06 08:50:22 -0800 |
commit | cabaaa69db311f83a2bd0ac78294cb42a1dc91e4 (patch) | |
tree | b93cbf3e3c06309469841445671d07a1310d9693 /desktop-widgets/locationinformation.h | |
parent | e5487f86a69d5524ba351bfe0fe2726036da57fa (diff) | |
download | subsurface-cabaaa69db311f83a2bd0ac78294cb42a1dc91e4.tar.gz |
Dive site: give visual clue for invalid coordinates
On the dive site edit screen, when the user enters invalid
coordinates and saves, we treat this as "no location". This
is rather unfriendly, therefore warn the user with a visual
clue. This is performed by setting the background color of
the widget to red.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/locationinformation.h')
-rw-r--r-- | desktop-widgets/locationinformation.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/locationinformation.h b/desktop-widgets/locationinformation.h index a936269e6..bed267dc2 100644 --- a/desktop-widgets/locationinformation.h +++ b/desktop-widgets/locationinformation.h @@ -27,6 +27,7 @@ public slots: void acceptChanges(); void on_diveSiteCountry_editingFinished(); void on_diveSiteCoordinates_editingFinished(); + void on_diveSiteCoordinates_textEdited(const QString &s); void on_diveSiteDescription_editingFinished(); void on_diveSiteName_editingFinished(); void on_diveSiteNotes_editingFinished(); @@ -42,6 +43,7 @@ private slots: private: void keyPressEvent(QKeyEvent *e) override; void clearLabels(); + void coordinatesSetWarning(bool warn); GPSLocationInformationModel filter_model; dive_site *diveSite; int64_t closeDistance; // Distance of "close" dive sites in mm |