Fixed Container not clearing child event handlers in DisownAll

This commit is contained in:
Sasha Koshka 2023-03-04 10:44:45 -05:00
parent 9c12cd7e18
commit 531b0ffce9

View File

@ -160,6 +160,9 @@ func (element *Container) clearChildEventHandlers (child elements.Element) {
// DisownAll removes all child elements from the container at once.
func (element *Container) DisownAll () {
for _, entry := range element.children {
element.clearChildEventHandlers(entry.Element)
}
element.children = nil
element.updateMinimumSize()