diff options
Diffstat (limited to 'src/ui/widgets/KeyTreeView.cpp')
-rw-r--r-- | src/ui/widgets/KeyTreeView.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/widgets/KeyTreeView.cpp b/src/ui/widgets/KeyTreeView.cpp index 3df5a440..c0a00c4e 100644 --- a/src/ui/widgets/KeyTreeView.cpp +++ b/src/ui/widgets/KeyTreeView.cpp @@ -32,6 +32,7 @@ #include "core/function/gpg/GpgKeyGetter.h" #include "core/utils/GpgUtils.h" +#include "ui/UISignalStation.h" #include "ui/dialog/keypair_details/KeyDetailsDialog.h" #include "ui/model/GpgKeyTreeProxyModel.h" @@ -121,6 +122,15 @@ void KeyTreeView::init() { new KeyDetailsDialog(model_->GetGpgContextChannel(), key, this); }); + + connect(UISignalStation::GetInstance(), + &UISignalStation::SignalKeyDatabaseRefresh, this, [=] { + model_ = QSharedPointer<GpgKeyTreeModel>::create( + channel_, GpgKeyGetter::GetInstance(channel_).FetchKey(), + [](auto) { return false; }, this); + proxy_model_.setSourceModel(model_.get()); + proxy_model_.invalidate(); + }); } void KeyTreeView::SetKeyFilter(const GpgKeyTreeProxyModel::KeyFilter& filter) { |