From 2c2adacb902cf4c5e385dd4d82068ad00a8eae4c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 10 Mar 2015 10:49:21 -0700 Subject: 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 --- qt-ui/simplewidgets.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui') 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) -- cgit v1.2.3-70-g09d2