From 150bd9763e7f95c589f2118f15bc2401bd3d3350 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 28 Feb 2020 00:29:56 +0100 Subject: 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 --- desktop-widgets/tab-widgets/maintab.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'desktop-widgets/tab-widgets') 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) { -- cgit v1.2.3-70-g09d2