aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/KeyMgmt.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-29 13:19:06 +0000
committersaturneric <[email protected]>2025-04-29 13:19:06 +0000
commit6106b66c879ecbdf5dec6dd8b63db383efca0844 (patch)
tree19327805289c783ec2a07449746170d614082e56 /src/ui/main_window/KeyMgmt.cpp
parentfix: filename of export key is not correct (diff)
downloadGpgFrontend-6106b66c879ecbdf5dec6dd8b63db383efca0844.tar.gz
GpgFrontend-6106b66c879ecbdf5dec6dd8b63db383efca0844.zip
fix: add to favorite function not works properly
Diffstat (limited to '')
-rw-r--r--src/ui/main_window/KeyMgmt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/main_window/KeyMgmt.cpp b/src/ui/main_window/KeyMgmt.cpp
index f9364ecf..8c384ebb 100644
--- a/src/ui/main_window/KeyMgmt.cpp
+++ b/src/ui/main_window/KeyMgmt.cpp
@@ -622,10 +622,10 @@ void KeyMgmt::slot_popup_menu_by_key_list(QContextMenuEvent* event,
if (keys.isEmpty()) return;
auto key = keys.front();
- generate_subkey_act_->setDisabled(key->KeyType() !=
- GpgAbstractKeyType::kGPG_KEY);
- set_owner_trust_of_key_act_->setDisabled(key->KeyType() !=
- GpgAbstractKeyType::kGPG_KEY);
+ generate_subkey_act_->setVisible(
+ key->KeyType() == GpgAbstractKeyType::kGPG_KEY && key->IsPrivateKey());
+ set_owner_trust_of_key_act_->setVisible(key->KeyType() ==
+ GpgAbstractKeyType::kGPG_KEY);
popup_menu_->exec(event->globalPos());
}