Properly delegate sub-windows on container element reload

This commit is contained in:
Gabriel Tofvesson 2024-10-04 00:55:12 +02:00
parent 5014f68f7f
commit 64613d943b
2 changed files with 5 additions and 8 deletions

View File

@ -29,14 +29,6 @@ function List:insertChild(child, atIndex)
adjustPositions(self.children, self:isVertical(), index)
end
function List:setParent(parent)
Element.setParent(self, parent)
local win = self:_getWindow()
for _,child in ipairs(self.children) do
child:setParent(win)
end
end
function List:removeChild(child)
local index
local searchType = type(child)

View File

@ -88,4 +88,9 @@ function Padding:handleEvent(evt)
return false
end
function Padding:_reload()
Element._reload(self)
self.element:setParent(self:_getWindow())
end
return Padding