Different states for edit / add dive site

When we start the dive site edit dialog, either for add or for edit, we
don't save the state, so the reject state didn't know what to do with the
dive site.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-03 23:50:36 -03:00 committed by Dirk Hohndel
parent 4c978eab2e
commit 612b068e33
4 changed files with 30 additions and 4 deletions

View file

@ -215,8 +215,13 @@ void MainWindow::on_actionManage_dive_sites_triggered() {
enableDiveSiteEdit(displayed_dive.dive_site_uuid);
}
void MainWindow::enableDiveSiteEdit(uint32_t id) {
locationInformationWidget()->setCurrentDiveSiteByUuid(id);
void MainWindow::enableDiveSiteCreation() {
locationInformationWidget()->createDiveSite();
setApplicationState("EditDiveSite");
}
void MainWindow::enableDiveSiteEdit(uint32_t id) {
locationInformationWidget()->editDiveSite(id);
setApplicationState("EditDiveSite");
}