Clear after accepting / rejecting the LocationEdit

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-03-09 15:55:49 -03:00 committed by Dirk Hohndel
parent 986b6c509a
commit 500c4c2772
2 changed files with 14 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);