(98ad00fa2) v0.9.1.0

This commit is contained in:
Joonas Rikkonen
2019-07-10 13:52:12 +03:00
parent 2a791887ed
commit afa2137bd2
104 changed files with 3041 additions and 3134 deletions
@@ -148,7 +148,14 @@ namespace Barotrauma
//find the parent GUIListBox highest in the hierarchy
for (int i = parentHierarchy.Count - 1; i >= 0; i--)
{
if (parentHierarchy[i].GUIComponent is GUIListBox) return parentHierarchy[i];
if (parentHierarchy[i].GUIComponent is GUIListBox)
{
if (parentHierarchy[i].Parent != null && parentHierarchy[i].Parent.GUIComponent != null)
{
return parentHierarchy[i].Parent;
}
return parentHierarchy[i];
}
}
//or just go with the direct parent if there are no listboxes in the hierarchy
parentHierarchy.Clear();