diff options
author | Arno <arno@disconnect.de> | 2019-01-12 17:51:29 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2019-01-12 17:51:29 +0100 |
commit | 4e5e0e6ec5668a0f0397dd8acbee0bd2f4bd0f67 (patch) | |
tree | 9c2ae637ff28d4e22af3a39ab31447dee44622ea /mappingeditwidget.h | |
parent | 1836f0768e3e7f38d4957f9348995cb062f55a07 (diff) | |
download | SheMov-4e5e0e6ec5668a0f0397dd8acbee0bd2f4bd0f67.tar.gz SheMov-4e5e0e6ec5668a0f0397dd8acbee0bd2f4bd0f67.tar.bz2 SheMov-4e5e0e6ec5668a0f0397dd8acbee0bd2f4bd0f67.zip |
Make NewPicsDialog usable by keyboard
Fix focus policy: only change focus between MappingTreeWidget and
MappingTreeResultView.
Also, block updating the selection of MappingTreeWidget when removing an
item from the result view. That operation resets the result selection
and by signal changes the selection of the mapping tree. The easiest way
I could come up with was a member flag that is set in removeMapping and
checked and cleared in resultSelectionChanged. Clearing the flag right
after removing the item doesn't work, most likely because of thread
affinity (just a guess, didn't check it). If it has side effects remains to
be seen...
Diffstat (limited to 'mappingeditwidget.h')
-rw-r--r-- | mappingeditwidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mappingeditwidget.h b/mappingeditwidget.h index 3044d80..54fdf0c 100644 --- a/mappingeditwidget.h +++ b/mappingeditwidget.h @@ -23,6 +23,7 @@ class MappingEditWidget : public QWidget { explicit MappingEditWidget(QWidget *parent = nullptr); MappingTreeResultModel *model() const { return mResultModel; } MappingTreeWidget *treeWidget() const { return mMappingTree; } + void blockResultChange(bool c) { mBlockResultChange = c; } public slots: void addMapping(); @@ -42,6 +43,7 @@ class MappingEditWidget : public QWidget { MappingTreeWidget *mMappingTree; MappingTreeResultView *mMappingResult; MappingTreeResultModel *mResultModel; + bool mBlockResultChange = false; }; #endif // MAPPINGEDITWIDGET_H |