From 20d88b376961f45dbd3021da13c9f5e4afb41f40 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 11 Jun 2019 21:45:41 +0300 Subject: [PATCH] (add36f1cf) Fixed dropdowns in workshop item publish menu being draw behind the buttons below them. --- Barotrauma/BarotraumaClient/Source/GUI/GUIDropDown.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/GUI/GUIDropDown.cs b/Barotrauma/BarotraumaClient/Source/GUI/GUIDropDown.cs index 6cdba8652..f92554433 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/GUIDropDown.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/GUIDropDown.cs @@ -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();