Use Planner dialog to add dive

Right now this is just calling the same code and setting a flag whether we
are planning or adding a dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-09-18 21:33:53 -05:00
parent 40462d5008
commit 882b2c146b
3 changed files with 24 additions and 14 deletions

View file

@ -209,6 +209,7 @@ void MainWindow::enableDcShortcuts()
void MainWindow::on_actionDivePlanner_triggered()
{
disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(true);
ui->stackedWidget->setCurrentIndex(1);
ui->infoPane->setCurrentIndex(1);
}
@ -254,15 +255,10 @@ void MainWindow::on_actionEditDeviceNames_triggered()
void MainWindow::on_actionAddDive_triggered()
{
struct dive *dive;
dive = alloc_dive();
record_dive(dive);
process_dives(FALSE, FALSE);
ui->InfoWidget->reload();
ui->globe->reload();
ui->ListWidget->reload(DiveTripModel::TREE);
ui->ListWidget->setFocus();
disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(false);
ui->stackedWidget->setCurrentIndex(1);
ui->infoPane->setCurrentIndex(1);
}
void MainWindow::on_actionRenumber_triggered()