summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-10 10:49:21 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-10 10:49:21 -0700
commit2c2adacb902cf4c5e385dd4d82068ad00a8eae4c (patch)
tree68b4422d4c98a79c639f055c33c3d2efe9da5f15
parentd5f6b104a280ed7d88bf961ed27b7b8487310337 (diff)
downloadsubsurface-2c2adacb902cf4c5e385dd4d82068ad00a8eae4c.tar.gz
Don't enter dive site edit mode whenever the coordinates are set in the UI
This function was missing the check if setting that field actually changes what's already in the data structure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/simplewidgets.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 08e6f1d41..f9deabd3c 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -784,7 +784,8 @@ void LocationInformationWidget::enableEdition()
void LocationInformationWidget::on_diveSiteCoordinates_textChanged(const QString& text)
{
- markChangedWidget(ui.diveSiteCoordinates);
+ if (!same_string(qPrintable(text), printGPSCoords(currentDs->latitude.udeg, currentDs->longitude.udeg)))
+ markChangedWidget(ui.diveSiteCoordinates);
}
void LocationInformationWidget::on_diveSiteDescription_textChanged(const QString& text)