From 3e3f39cfcd78789ab9b46f485ebb97c8599ebb99 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 23 Feb 2020 10:24:24 +0200 Subject: [PATCH] dont load orphaned-central layout when shared --the orphaned-central layout should NOT be loaded when it has already been loaded as SHARED layout for other CENTRAL layouts in a MULTIPLE LAYOUTS environment BUG:417886 FIXED-IN:0.9.9 --- app/layouts/synchronizer.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/layouts/synchronizer.cpp b/app/layouts/synchronizer.cpp index d1084f508..0bbd163ff 100644 --- a/app/layouts/synchronizer.cpp +++ b/app/layouts/synchronizer.cpp @@ -865,19 +865,6 @@ void Synchronizer::syncMultipleLayoutsToActivities(QString layoutForOrphans) } } - //! Add Layout for orphan activities - if (!allRunningActivitiesWillBeReserved) { - if (!centralLayout(layoutForOrphans)) { - CentralLayout *newLayout = new CentralLayout(this, layoutPath(layoutForOrphans), layoutForOrphans); - - if (newLayout) { - qDebug() << "ACTIVATING ORPHANED LAYOUT ::::: " << layoutForOrphans; - addLayout(newLayout); - newLayout->importToCorona(); - } - } - } - //! Add needed Layouts based on Activities for (const auto &layoutName : layoutsToLoad) { if (!centralLayout(layoutName)) { @@ -895,6 +882,21 @@ void Synchronizer::syncMultipleLayoutsToActivities(QString layoutForOrphans) } } + //! Add Layout for orphan activities + if (!allRunningActivitiesWillBeReserved) { + if (!centralLayout(layoutForOrphans) && !sharedLayout(layoutForOrphans)) { + //! CENTRAL Layout for Orphaned Activities is not loaded and at the same time + //! that layout is not already configured as SHARED for other CENTRAL layouts + CentralLayout *newLayout = new CentralLayout(this, layoutPath(layoutForOrphans), layoutForOrphans); + + if (newLayout) { + qDebug() << "ACTIVATING ORPHANED LAYOUT ::::: " << layoutForOrphans; + addLayout(newLayout); + newLayout->importToCorona(); + } + } + } + updateCurrentLayoutNameInMultiEnvironment(); emit centralLayoutsChanged(); }