Verified Commit 222150af authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Uncheck other views when toggling

When switching from notepad to smartcardview and vice
versa the toggle state of the actions could be wrong
because untoggle goes back to the main view.
parent 35101f0b
......@@ -254,6 +254,13 @@ public:
void toggleSmartcardView()
{
const auto coll = q->actionCollection();
if (coll) {
auto act = coll->action(QStringLiteral("pad_view"));
if (act) {
act->setChecked(false);
}
}
if (ui.stackWidget->currentWidget() == ui.scWidget) {
ui.stackWidget->setCurrentWidget(ui.searchTab);
checkWelcomePage();
......@@ -264,6 +271,13 @@ public:
void togglePadView()
{
const auto coll = q->actionCollection();
if (coll) {
auto act = coll->action(QStringLiteral("manage_smartcard"));
if (act) {
act->setChecked(false);
}
}
if (ui.stackWidget->currentWidget() == ui.padWidget) {
ui.stackWidget->setCurrentWidget(ui.searchTab);
checkWelcomePage();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment