diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-21 20:34:06 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-22 09:12:32 +0900 |
commit | fe1df6b1cc171a6b9a08de20a1eacf4b02c89191 (patch) | |
tree | e1e9643ffa679ffae506e99c7f57d5095c6c6687 /qt-ui/maintab.cpp | |
parent | 3661f291a4d88448c3339bdd3c2d3ad8c6090256 (diff) | |
download | subsurface-fe1df6b1cc171a6b9a08de20a1eacf4b02c89191.tar.gz |
Back to profile or empty state when finishing addition.
This patch adds a signal to MainTab, that should be removed from there
when we finish the rework on the edit part, to go to the edit classes,
but in the meantime, let's keep it there.
The signal is connected to the ProfileWidget in a way that the end of the
edit will also trigger the profile to go back to ProfileState (show the
dive, if there's any) or empty Profile (if there's none).
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 96e2efc1c..2fd07878b 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -761,6 +761,7 @@ void MainTab::acceptChanges() editMode = NONE; MainWindow::instance()->refreshDisplay(); MainWindow::instance()->graphics()->replot(); + emit addDiveFinished(); } else { editMode = NONE; MainWindow::instance()->dive_list()->rememberSelection(); @@ -861,6 +862,7 @@ void MainTab::rejectChanges() delete_single_dive(selected_dive); MainWindow::instance()->dive_list()->reload(DiveTripModel::CURRENT); MainWindow::instance()->dive_list()->restoreSelection(); + emit addDiveFinished(); } if (selected_dive >= 0) { multiEditEquipmentPlaceholder = *get_dive(selected_dive); |