From a5df2865baf377a861b63448b85d5cb22ed43864 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 14 Jan 2022 20:03:11 +0200 Subject: [PATCH] view:unblock events when user undo removal --this way when a dock or panel is scheduled for removal but the user undo that removal all events for main dock/panel window are forwarded correctly. As a side fix parabolic effect works just fine now is such scenario. --- app/view/view.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/view/view.cpp b/app/view/view.cpp index dce8097bb..0efac248e 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -190,6 +190,10 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassX11WM) emit inEditModeChanged(); }); + connect(this->containment(), &Plasma::Containment::destroyedChanged, this, [&]() { + m_inDelete = containment()->destroyed(); + }); + if (m_corona->viewSettingsFactory()->hasOrphanSettings() && m_corona->viewSettingsFactory()->hasVisibleSettings() && m_corona->viewSettingsFactory()->lastContainment() == containment()) { @@ -523,8 +527,6 @@ void View::newView(const QString &templateFile) void View::removeView() { if (m_layout) { - m_inDelete = true; - QAction *removeAct = action("remove"); if (removeAct) {