diff options
author | saturneric <[email protected]> | 2024-10-26 11:23:44 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-10-26 11:23:44 +0000 |
commit | f0362e978665ccacce2611762d173adac379cfd8 (patch) | |
tree | 4f92111e0e60e82d5335d8e26ceabb64b28e533b /src/ui/widgets/KeyList.cpp | |
parent | fix: try debugging key database refreshing process (diff) | |
download | GpgFrontend-f0362e978665ccacce2611762d173adac379cfd8.tar.gz GpgFrontend-f0362e978665ccacce2611762d173adac379cfd8.zip |
fix: thread concurrent crash issue
Diffstat (limited to '')
-rw-r--r-- | src/ui/widgets/KeyList.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp index ff6f4e22..4f20bac9 100644 --- a/src/ui/widgets/KeyList.cpp +++ b/src/ui/widgets/KeyList.cpp @@ -93,8 +93,10 @@ void KeyList::init() { switch_context_action->setChecked(channel == current_gpg_context_channel_); connect(switch_context_action, &QAction::toggled, this, [this, channel](bool checked) { - current_gpg_context_channel_ = channel; - emit SignalRefreshDatabase(); + if (checked) { + current_gpg_context_channel_ = channel; + emit SignalRefreshDatabase(); + } }); gpg_context_groups->addAction(switch_context_action); gpg_context_menu->addAction(switch_context_action); |