mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Helper function to determined planned dives
... to reduce code duplication. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
f1fc89b978
commit
c349692d98
4 changed files with 8 additions and 3 deletions
|
@ -965,7 +965,7 @@ void MainWindow::on_actionReplanDive_triggered()
|
|||
{
|
||||
if (!plannerStateClean() || !current_dive)
|
||||
return;
|
||||
else if (!current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) {
|
||||
else if (!is_dc_planner(¤t_dive->dc)) {
|
||||
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