aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/ADSKsPicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/ADSKsPicker.cpp')
-rw-r--r--src/ui/dialog/ADSKsPicker.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/dialog/ADSKsPicker.cpp b/src/ui/dialog/ADSKsPicker.cpp
index f10a936a..a8afb9bf 100644
--- a/src/ui/dialog/ADSKsPicker.cpp
+++ b/src/ui/dialog/ADSKsPicker.cpp
@@ -38,9 +38,14 @@ ADSKsPicker::ADSKsPicker(int channel,
QWidget* parent)
: GeneralDialog(typeid(ADSKsPicker).name(), parent),
tree_view_(new KeyTreeView(
- channel, [](GpgAbstractKey* k) { return k->IsSubKey(); },
+ channel,
+ [](GpgAbstractKey* k) {
+ return k->KeyType() == GpgAbstractKeyType::kGPG_SUBKEY;
+ },
[=](const GpgAbstractKey* k) {
- return (!k->IsSubKey() || (k->IsSubKey() && k->IsHasEncrCap())) &&
+ return (k->KeyType() != GpgAbstractKeyType::kGPG_SUBKEY ||
+ (k->KeyType() == GpgAbstractKeyType::kGPG_SUBKEY &&
+ k->IsHasEncrCap())) &&
filter(k);
})) {
auto* confirm_button = new QPushButton(tr("Confirm"));