Skip to content

Commit

Permalink
Allow collapsing of body with sub-bodies still open (Issue #28)
Browse files Browse the repository at this point in the history
  • Loading branch information
KSP-TaxiService committed Dec 12, 2020
1 parent 710a954 commit 211aeae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/CommNetConstellation/UI/ConstellationControlDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,13 @@ private List<DialogGUIHorizontalLayout> populateCBodyVesselRows(VesselListSort s
{
var current = dfs.Pop();

// push childen if expanded
if (current.Expanded)
// push childen
for (int j = 0; j < current.SubEntries.Count; j++)
{
for (int j = 0; j < current.SubEntries.Count; j++)
var child = current.SubEntries[j];
if (child.Guid == Guid.Empty || (child.Guid != Guid.Empty && current.Expanded))
{
dfs.Push(current.SubEntries[j]);
dfs.Push(current.SubEntries[j]); // add if planet or vessels under expanded planet header
}
}

Expand Down

0 comments on commit 211aeae

Please sign in to comment.