mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
TabContextMenu: Correctly re-enable RestoreClosedTab action
This commit is contained in:
parent
dd30a1bc72
commit
5453308571
@ -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)
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user