|
@@ -14,7 +14,7 @@ JPH_IMPLEMENT_RTTI_VIRTUAL(UIHorizontalStack)
|
|
|
void UIHorizontalStack::sUniformChildWidth(UIElement *inParent)
|
|
|
{
|
|
|
Array<int> sizes;
|
|
|
- sizes.resize(1);
|
|
|
+ sizes.resize(1, 0);
|
|
|
for (UIElement *e : inParent->GetChildren())
|
|
|
{
|
|
|
e->AutoLayout();
|
|
@@ -23,7 +23,7 @@ void UIHorizontalStack::sUniformChildWidth(UIElement *inParent)
|
|
|
if (horiz != nullptr)
|
|
|
{
|
|
|
if (horiz->GetNumChildren() > (int)sizes.size())
|
|
|
- sizes.resize(horiz->GetNumChildren());
|
|
|
+ sizes.resize(horiz->GetNumChildren(), 0);
|
|
|
for (int i = 0; i < horiz->GetNumChildren(); ++i)
|
|
|
sizes[i] = max(sizes[i], horiz->GetChild(i)->GetWidth());
|
|
|
}
|