Verified Commit bea29526 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

containments/panel: depend on appletsModel in `checkLastSpacer`

Depending on layout's children is not reliable enough, because when
adding applets, one applet can be already in `appletsModel` but not in
the layout before the layout polish loop is finished.
parent 199ff3d4
Pipeline #180794 passed with stage
in 5 minutes and 11 seconds
......@@ -63,8 +63,8 @@ DragDrop.DropArea {
//BEGIN functions
function checkLastSpacer() {
var flexibleFound = false;
for (var i = 0; i < currentLayout.children.length; ++i) {
var applet = currentLayout.children[i].applet;
for (var i = 0; i < appletsModel.count; ++i) {
const applet = appletsModel.get(i).applet;
if (!applet || !applet.visible || !applet.Layout) {
continue;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment