mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use fake profile when replanning dives without samples
This can happen when the user asks to replan a dive that was imported from CSV. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
97be5fda2c
commit
05098f90cd
2 changed files with 12 additions and 8 deletions
|
@ -903,9 +903,9 @@ void MainWindow::setupForAddAndPlan(const char *model)
|
|||
|
||||
void MainWindow::on_actionReplanDive_triggered()
|
||||
{
|
||||
if (!plannerStateClean() || !current_dive || !current_dive->dc.model)
|
||||
if (!plannerStateClean() || !current_dive)
|
||||
return;
|
||||
else if (strcmp(current_dive->dc.model, "planned dive")) {
|
||||
else if (!current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) {
|
||||
if (QMessageBox::warning(this, tr("Warning"), tr("Trying to replan a dive that's not a planned dive."),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue