1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

TabContextMenu: Correctly re-enable RestoreClosedTab action

This commit is contained in:
David Rosca 2018-02-21 17:41:28 +01:00
parent dd30a1bc72
commit 5453308571
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 3 additions and 2 deletions

View File

@ -354,8 +354,6 @@ void TabBar::contextMenuEvent(QContextMenuEvent* event)
const QPoint pos = event->globalPos(); const QPoint pos = event->globalPos();
QPoint p(pos.x(), pos.y() + 1); QPoint p(pos.x(), pos.y() + 1);
menu.exec(p); menu.exec(p);
m_window->action(QSL("Other/RestoreClosedTab"))->setEnabled(true);
} }
void TabBar::hideCloseButton(int index) void TabBar::hideCloseButton(int index)

View File

@ -159,6 +159,9 @@ void TabContextMenu::init()
} }
m_window->action(QSL("Other/RestoreClosedTab"))->setEnabled(tabWidget->canRestoreTab()); m_window->action(QSL("Other/RestoreClosedTab"))->setEnabled(tabWidget->canRestoreTab());
connect(this, &QMenu::aboutToHide, this, [this]() {
m_window->action(QSL("Other/RestoreClosedTab"))->setEnabled(true);
});
} }
void TabContextMenu::pinTab() void TabContextMenu::pinTab()