diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index f9420be2c..1cabdfacf 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -9,6 +9,7 @@ #include <QGraphicsProxyWidget> #include <QPushButton> #include <QGraphicsSceneMouseEvent> +#include <QMessageBox> #include "ui_diveplanner.h" #include "mainwindow.h" @@ -262,6 +263,13 @@ qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientatio void DivePlannerGraphics::cancelClicked() { + if (handles.size()){ + if (QMessageBox::warning(mainWindow(), tr("Save the Plan?"), + tr("You have a working plan, \n are you sure that you wanna cancel it?"), + QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok){ + return; + } + } mainWindow()->showProfile(); } |