1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-05 05:47:26 +03:00

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
This commit is contained in:
Michail Vourlakos 2020-02-23 10:24:24 +02:00
parent af712c6ac4
commit ad58783ae5

View File

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