From 612b068e33d0c7510e3bee0fd15aceff1f788841 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 3 Jun 2015 23:50:36 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qt-ui/mainwindow.cpp') 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"); } -- cgit v1.2.3-70-g09d2