Skip to content

Commit 6d9a4cb

Browse files
committed
Hotfix list parent issue
1 parent e986996 commit 6d9a4cb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/main/java/com/ldtteam/blockui/views/ScrollingListContainer.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,10 @@ public void setListNodeParams(final @NotNull PaneParams listNodeParams)
3939
{
4040
this.listNodeParams = listNodeParams;
4141

42-
final Pane template = Loader.createFromPaneParams(listNodeParams, null);
43-
if (template == null)
44-
{
45-
SafeError.throwInDev(new IllegalStateException("Scrolling list template could not be loaded. Is there a reference to another layout in the list children?"));
46-
return;
47-
}
48-
49-
this.templateSize = new SizeI(template.getWidth(), template.getHeight());
42+
listNodeParams.setParentView(this);
43+
listNodeParams.getScaledInteger("size", listNodeParams.getParentWidth(), listNodeParams.getParentHeight(), a -> {
44+
this.templateSize = new SizeI(a.get(0), a.get(1));
45+
});
5046
}
5147

5248
/**

0 commit comments

Comments
 (0)