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 e2be32ce9..247d22b28 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 @@ -281,11 +281,13 @@ open class EditablePanel( if (visibleChildrenParent?.contains(this) == false) { visibleChildrenParent.add(this) + parent?.invalidateChildrenSorting() parent?.layoutInvalidated = true } } else { if (visibleChildrenParent?.contains(this) == true) { visibleChildrenParent.remove(this) + parent?.invalidateChildrenSorting() parent?.layoutInvalidated = true } } @@ -1451,6 +1453,7 @@ open class EditablePanel( if (old != new) { child.visibilityChanges(new, old) + child.invalidateChildrenSorting() } child.updateVisible()