summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-18 22:37:18 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commit3b9913d82893ca023eaea2e25cdbc86765aeb40a (patch)
tree43cf189107fcbf234e9efc8cbca8ba7898963e07 /desktop-widgets/tab-widgets/maintab.h
parente8beeb6767b387204fcaae4a066f226ca37f8a82 (diff)
downloadsubsurface-3b9913d82893ca023eaea2e25cdbc86765aeb40a.tar.gz
desktop/tabwidgets: replace IGNORE_MODE by flag
The editMode was set to IGNORE_MODE when programatically setting fields so that we can ignore changed-signals. That seems to be orthogonal to whether we are in edit mode and indeed when setting IGNORE_MODE the edit mode was saved and restored. Therefore, replace the IGNORE_MODE by an independent ignoreInput flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.h')
-rw-r--r--desktop-widgets/tab-widgets/maintab.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h
index d6a5af593..bf071619b 100644
--- a/desktop-widgets/tab-widgets/maintab.h
+++ b/desktop-widgets/tab-widgets/maintab.h
@@ -28,8 +28,7 @@ class MainTab : public QTabWidget {
public:
enum EditMode {
NONE,
- MANUALLY_ADDED_DIVE,
- IGNORE_MODE
+ MANUALLY_ADDED_DIVE
};
MainTab(QWidget *parent = 0);
@@ -76,6 +75,7 @@ slots:
private:
Ui::MainTab ui;
EditMode editMode;
+ bool ignoreInput; // When computionally editing fields, we have to ignore changed-signals
BuddyCompletionModel buddyModel;
DiveMasterCompletionModel diveMasterModel;
TagCompletionModel tagModel;