From 419886b2eac2d04778d35848c518170b644dc402 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 27 Aug 2020 08:09:03 +0300 Subject: [PATCH] identify dock changing layout in same visible area --- app/view/positioner.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/view/positioner.cpp b/app/view/positioner.cpp index 080b59184..32b8d6d03 100644 --- a/app/view/positioner.cpp +++ b/app/view/positioner.cpp @@ -1035,11 +1035,16 @@ void Positioner::hideDockDuringMovingToLayout(QString layoutName) auto layout = m_view->layout(); - auto central = qobject_cast(layout); + auto origin = qobject_cast(layout); + auto destination = m_corona->layoutsManager()->synchronizer()->centralLayout(layoutName); + + if (!origin || !destination) { + return; + } //! Needs to be updated; when the next layout is in the same Visible Workarea //! with the old one changing layouts should be instant - bool inVisibleWorkarea{true}; + bool inVisibleWorkarea{origin->lastUsedActivity() == destination->lastUsedActivity()}; if (inVisibleWorkarea) { m_view->moveToLayout(layoutName);