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>
This commit is contained in:
Berthold Stoeger 2020-03-18 22:37:18 +01:00
parent e8beeb6767
commit 3b9913d828
2 changed files with 18 additions and 18 deletions

View file

@ -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;