Ensure that menu is shown after clicked item is set as current item
We'll update the actions (enabled/disabled) whenever the current item
changes. Therefore, we have to make sure that the clicked item is set
as current item before the menu is shown. Since Qt shows the menu on
pressed we cannot set it on the Actions button on creation. Instead we
set and show the menu ourselves when the button is pressed and we have
updated the current item.
(cherry picked from commit 005064cb641c3e4111325e6c111d2e0bb5f603f8)
- GnuPG-bug-id: T7018