diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-06-03 23:50:36 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-03 21:36:42 -0700 |
commit | 612b068e33d0c7510e3bee0fd15aceff1f788841 (patch) | |
tree | ec5098b6617b6bf7c64e3f6aebbb51e0653b81bc /qt-ui/mainwindow.cpp | |
parent | 4c978eab2e4889054936c75db3fe4c02cba6d386 (diff) | |
download | subsurface-612b068e33d0c7510e3bee0fd15aceff1f788841.tar.gz |
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>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index aef22497b..e4309a23b 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -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"); } |