ChildWindow::setSize called Widget::setSize instead of Container::setSize, causing child widgets that used a relative size to not be updated when the child window was given a size

0.8
Bruno Van de Velde 2017-08-01 01:02:20 +02:00
parent 314503484e
commit 17743569a3
1 changed files with 3 additions and 3 deletions

View File

@ -115,10 +115,10 @@ namespace tgui
else if (x > m_parent->getSize().x - getSize().x)
x = m_parent->getSize().x - getSize().x;
Widget::setPosition({x, y});
Container::setPosition({x, y});
}
else
Widget::setPosition(position);
Container::setPosition(position);
// Calculate the distance from the right side that the buttons will need
float buttonOffsetX = 0;
@ -163,7 +163,7 @@ namespace tgui
void ChildWindow::setSize(const Layout2d& size)
{
Widget::setSize(size);
Container::setSize(size);
m_bordersCached.updateParentSize(getSize());