mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't show the planner widget when adding a dive
This looks like it might work, but since we keep recreating the dive, the info entered in the info pane is actually lost. But it's a step in the right direction. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
56535e4b3b
commit
64b014aefb
2 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include "modeldelegates.h"
|
#include "modeldelegates.h"
|
||||||
#include "ui_diveplanner.h"
|
#include "ui_diveplanner.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "maintab.h"
|
||||||
#include "tableview.h"
|
#include "tableview.h"
|
||||||
#include "graphicsview-common.h"
|
#include "graphicsview-common.h"
|
||||||
|
|
||||||
|
@ -1149,6 +1150,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
|
||||||
tempDive = NULL;
|
tempDive = NULL;
|
||||||
char *errorString = NULL;
|
char *errorString = NULL;
|
||||||
plan(&diveplan, &cache, &tempDive, isPlanner(), &errorString);
|
plan(&diveplan, &cache, &tempDive, isPlanner(), &errorString);
|
||||||
|
mainWindow()->information()->updateDiveInfo(get_divenr(tempDive));
|
||||||
#if DEBUG_PLAN
|
#if DEBUG_PLAN
|
||||||
dump_plan(&diveplan);
|
dump_plan(&diveplan);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -258,7 +258,11 @@ void MainWindow::on_actionAddDive_triggered()
|
||||||
disableDcShortcuts();
|
disableDcShortcuts();
|
||||||
DivePlannerPointsModel::instance()->setPlanMode(false);
|
DivePlannerPointsModel::instance()->setPlanMode(false);
|
||||||
ui->stackedWidget->setCurrentIndex(1);
|
ui->stackedWidget->setCurrentIndex(1);
|
||||||
ui->infoPane->setCurrentIndex(1);
|
ui->infoPane->setCurrentIndex(0);
|
||||||
|
ui->InfoWidget->clearStats();
|
||||||
|
ui->InfoWidget->clearInfo();
|
||||||
|
ui->InfoWidget->clearEquipment();
|
||||||
|
ui->InfoWidget->updateDiveInfo(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionRenumber_triggered()
|
void MainWindow::on_actionRenumber_triggered()
|
||||||
|
|
Loading…
Add table
Reference in a new issue