From 1a581c4135fa8806c6d6288f5a55776ae2aecd15 Mon Sep 17 00:00:00 2001 From: Simone Gaiarin Date: Tue, 14 Jul 2020 12:13:34 +0200 Subject: [PATCH] Do not setup actions on tab destruction The toolbar actions must be setup only when a tab is selected thus activating a different part, while nothing should happen when a tab is closed. BUG 423335 --- part.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/part.cpp b/part.cpp index 83dedb35d..114c34c2d 100644 --- a/part.cpp +++ b/part.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #include #include #include @@ -1824,7 +1825,9 @@ void Part::guiActivateEvent(KParts::GUIActivateEvent *event) setWindowTitleFromDocument(); - m_pageView->setupActionsPostGUIActivated(); + if (event->activated()) { + m_pageView->setupActionsPostGUIActivated(); + } } void Part::close()