1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-09-15 09:44:21 +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

@@ -640,26 +640,13 @@ Item {
} else if (x >= 0 && y >= 0) { } else if (x >= 0 && y >= 0) {
// If the provided position is valid, use it. // If the provided position is valid, use it.
fastLayoutManager.insertAtCoordinates(appletItem, x , y); 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 { } else {
// Fall through to adding at the end of main layout. // Fall through to adding at the end of main layout.
appletItem.parent = layoutsContainer.mainLayout; appletItem.parent = layoutsContainer.mainLayout;
} }
}
//Important, removes the first children of the layoutsContainer.mainLayout after the first applet has been added //Important, removes the first children of the layoutsContainer.mainLayout after the first applet has been added
lastSpacer.parent = root; lastSpacer.parent = root;
updateIndexes(); updateIndexes();
} }