mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
986b6c509a
commit
500c4c2772
2 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue