summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-26 22:49:38 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-27 14:49:01 -0800
commit0306109e952c46d182f78e14a0259f56cce87928 (patch)
tree56052035c00138a595797e7d9719c7a77ef59c3d
parent1eb8f7cbaa0b71732baf1a6e560c8ed51e4ad09a (diff)
downloadsubsurface-0306109e952c46d182f78e14a0259f56cce87928.tar.gz
cleanup: remove MainTab::modified
This field was not set to true since introducing undo of dive fields. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp5
-rw-r--r--desktop-widgets/tab-widgets/maintab.h1
2 files changed, 1 insertions, 5 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 01e630104..006603388 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -50,7 +50,6 @@ struct Completers {
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
editMode(NONE),
- modified(false),
lastSelectedDive(true),
lastTabSelectedDive(0),
lastTabSelectedDiveTrip(0),
@@ -211,7 +210,6 @@ void MainTab::enableEdition(EditMode newEditMode)
{
if (((newEditMode == DIVE || newEditMode == NONE) && current_dive == NULL) || editMode != NONE)
return;
- modified = false;
if ((newEditMode == DIVE || newEditMode == NONE) &&
current_dive->dc.model &&
strcmp(current_dive->dc.model, "manually added dive") == 0) {
@@ -592,8 +590,7 @@ void MainTab::rejectChanges()
EditMode lastMode = editMode;
if (lastMode != NONE && current_dive &&
- (modified ||
- !cylinders_equal(current_dive, &displayed_dive) ||
+ (!cylinders_equal(current_dive, &displayed_dive) ||
!weightsystems_equal(current_dive, &displayed_dive))) {
if (QMessageBox::warning(MainWindow::instance(), TITLE_OR_TEXT(tr("Discard the changes?"),
tr("You are about to discard your changes.")),
diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h
index f1caf8ed1..6411f6b3a 100644
--- a/desktop-widgets/tab-widgets/maintab.h
+++ b/desktop-widgets/tab-widgets/maintab.h
@@ -80,7 +80,6 @@ private:
BuddyCompletionModel buddyModel;
DiveMasterCompletionModel diveMasterModel;
TagCompletionModel tagModel;
- bool modified;
bool lastSelectedDive;
int lastTabSelectedDive;
int lastTabSelectedDiveTrip;