mirror of
https://github.com/KDE/konsole.git
synced 2026-02-05 12:51:44 -05:00
Add HamburgerMenu only once per instance
A new HamburgerMenu is added to the context menu each time it is opened which causes a delay after enough invocations. Skip adding another if one has already been added. BUG: 495029
This commit is contained in:
committed by
Kurt Hindenburg
parent
33c026e2bb
commit
ab751a3b16
@@ -128,6 +128,7 @@ SessionController::SessionController(Session *sessionParam, TerminalDisplay *vie
|
||||
, _monitorProcessFinish(false)
|
||||
, _monitorOnce(false)
|
||||
, _escapedUrlFilter(nullptr)
|
||||
, _addedHamburgerMenu(false)
|
||||
{
|
||||
Q_ASSERT(sessionParam);
|
||||
Q_ASSERT(viewParam);
|
||||
@@ -2089,9 +2090,12 @@ void SessionController::showDisplayContextMenu(const QPoint &position)
|
||||
|
||||
_preventClose = true;
|
||||
|
||||
auto hamburger = static_cast<KHamburgerMenu *>(actionCollection()->action(KStandardAction::name(KStandardAction::HamburgerMenu)));
|
||||
if (hamburger) {
|
||||
hamburger->addToMenu(popup);
|
||||
if (!_addedHamburgerMenu) {
|
||||
auto hamburger = static_cast<KHamburgerMenu *>(actionCollection()->action(KStandardAction::name(KStandardAction::HamburgerMenu)));
|
||||
if (hamburger) {
|
||||
hamburger->addToMenu(popup);
|
||||
_addedHamburgerMenu = true;
|
||||
}
|
||||
}
|
||||
|
||||
// they are here.
|
||||
|
||||
Reference in New Issue
Block a user