(5a6865d0f) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-06-11 21:46:57 +03:00
parent c30f1de8f3
commit e9c8103be4
3 changed files with 33 additions and 30 deletions
@@ -148,7 +148,7 @@ 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) return parentHierarchy[i]?.Parent ?? parentHierarchy[i];
}
//or just go with the direct parent if there are no listboxes in the hierarchy
parentHierarchy.Clear();