aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-28 00:29:56 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commit150bd9763e7f95c589f2118f15bc2401bd3d3350 (patch)
treea6278a4691a1aab0eb2fc4b63262515a7cc80da7 /desktop-widgets/tab-widgets
parent5f858e137d37e7fd2f6325b22651bf1842e872a0 (diff)
downloadsubsurface-150bd9763e7f95c589f2118f15bc2401bd3d3350.tar.gz
cleanup: remove lastMode variable in MainTab::rejectChanges()
This stored the old editMode. However, it was not read after editMode was changed, so there is no point to it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 3aed133cd..2c64833da 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -540,9 +540,7 @@ void MainTab::acceptChanges()
void MainTab::rejectChanges()
{
- EditMode lastMode = editMode;
-
- if (lastMode != NONE && current_dive) {
+ if (editMode != NONE && current_dive) {
if (QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(tr("Discard the changes?"),
tr("You are about to discard your changes.")),
QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard) != QMessageBox::Discard) {