diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt index 4b998974c..182de36ea 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt @@ -1404,7 +1404,14 @@ open class EditablePanel( for (child in visibleChildrenInternal) { when (child.dock) { - Dock.NONE, Dock.FILL -> {} // do nothing + Dock.NONE -> { + width = maxOf(width, child.x + child.width) + height = maxOf(height, child.y + child.height) + } + + Dock.FILL -> { + throw RuntimeException() + } // do nothing Dock.LEFT, Dock.RIGHT -> { if (previousDock != 1) {