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>
This commit is contained in:
Berthold Stoeger 2020-02-28 00:29:56 +01:00
parent 5f858e137d
commit 150bd9763e

View file

@ -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) {