Skip to content

Commit a681128

Browse files
committed
Switched toggle to explicit open.
1 parent 70a7c5c commit a681128

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Nodes/BaseNode.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ internal void ToggleLevelOpen(int level)
158158
levelsOpen[level] = !levelsOpen[level];
159159
}
160160

161+
/// <summary>Sets the specific level.</summary>
162+
/// <param name="level">The level to set.</param>
163+
/// <param name="open">True to open.</param>
164+
internal void SetLevelOpen(int level, bool open)
165+
{
166+
levelsOpen[level] = open;
167+
}
168+
161169
/// <summary>Adds a <see cref="HotSpot"/> the user can interact with.</summary>
162170
/// <param name="view">The view information.</param>
163171
/// <param name="spot">The spot.</param>

UI/MemoryViewControl.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
646646
if (selectedNodes.Count == 1)
647647
{
648648
var selected = selectedNodes[0];
649-
selected.Node.ToggleLevelOpen(selected.Level);
649+
650+
selected.Node.SetLevelOpen(selected.Level, key == Keys.Right);
650651
}
651652
}
652653
}

0 commit comments

Comments
 (0)