mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
40462d5008
commit
882b2c146b
3 changed files with 24 additions and 14 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue