1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-12 17:17:50 +03:00

remove some lastSpacer deprecated code

This commit is contained in:
Michail Vourlakos 2021-03-04 11:24:49 +02:00
parent c4099d4886
commit c25f9f7b54

View File

@ -641,25 +641,12 @@ Item {
// If the provided position is valid, use it.
fastLayoutManager.insertAtCoordinates(appletItem, x , y);
} else {
// Fall through to determining an appropriate insert position.
var before = null;
appletItem.animationsEnabled = false;
if (lastSpacer.parent === layoutsContainer.mainLayout) {
before = lastSpacer;
}
if (before) {
fastLayoutManager.insertBefore(before, appletItem);
} else {
// Fall through to adding at the end of main layout.
appletItem.parent = layoutsContainer.mainLayout;
}
// Fall through to adding at the end of main layout.
appletItem.parent = layoutsContainer.mainLayout;
}
//Important, removes the first children of the layoutsContainer.mainLayout after the first applet has been added
lastSpacer.parent = root;
updateIndexes();
}