summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/simplewidgets.cpp13
-rw-r--r--qt-ui/simplewidgets.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index e1ad6b861..08e6f1d41 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -740,6 +740,8 @@ void LocationInformationWidget::acceptChanges()
setLocationId(currentDs->uuid);
}
mark_divelist_changed(true);
+ resetPallete();
+ ui.diveSiteNotes->hide();
emit informationManagementEnded();
}
@@ -753,6 +755,8 @@ void LocationInformationWidget::rejectChanges()
} else {
setLocationId(currentDs->uuid);
}
+ resetPallete();
+ ui.diveSiteNotes->hide();
emit informationManagementEnded();
}
@@ -800,3 +804,12 @@ void LocationInformationWidget::on_diveSiteNotes_textChanged()
if (!same_string(qPrintable(ui.diveSiteNotes->toPlainText()), currentDs->notes))
markChangedWidget(ui.diveSiteNotes);
}
+
+void LocationInformationWidget::resetPallete()
+{
+ QPalette p;
+ ui.diveSiteCoordinates->setPalette(p);
+ ui.diveSiteDescription->setPalette(p);
+ ui.diveSiteName->setPalette(p);
+ ui.diveSiteNotes->setPalette(p);
+}
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h
index f90e5bc69..d86fefd70 100644
--- a/qt-ui/simplewidgets.h
+++ b/qt-ui/simplewidgets.h
@@ -232,6 +232,7 @@ public slots:
void updateGpsCoordinates(void);
void markChangedWidget(QWidget *w);
void enableEdition();
+ void resetPallete();
void on_diveSiteCoordinates_textChanged(const QString& text);
void on_diveSiteDescription_textChanged(const QString& text);