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
pull/11/head
Michail Vourlakos 5 years ago
parent af712c6ac4
commit ad58783ae5

@ -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();
}

Loading…
Cancel
Save