summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-03-09 15:55:49 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-10 07:47:30 -0700
commit500c4c2772ef2c569e9f559d8b22ec39febc4b41 (patch)
tree63ceef4498fc1d7ed0aed45422d8c38be490c869
parent986b6c509aab851371865bb6f46941557bbe9409 (diff)
downloadsubsurface-500c4c2772ef2c569e9f559d8b22ec39febc4b41.tar.gz
Clear after accepting / rejecting the LocationEdit
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-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);