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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user