Skip to content

Commit a41ad33

Browse files
committed
Fixed bug introduced with 566ae12.
1 parent 566ae12 commit a41ad33

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

ReClass.NET/UI/MemoryViewControl.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ protected override void OnMouseDoubleClick(MouseEventArgs e)
451451

452452
editBox.Visible = false;
453453

454+
BaseNode toggleNode = null;
455+
var level = 0;
456+
454457
foreach (var hotSpot in hotSpots.Where(h => h.Type == HotSpotType.Edit || h.Type == HotSpotType.Select))
455458
{
456459
if (hotSpot.Rect.Contains(e.Location))
@@ -463,19 +466,23 @@ protected override void OnMouseDoubleClick(MouseEventArgs e)
463466

464467
editBox.ReadOnly = hotSpot.Id == HotSpot.ReadOnlyId;
465468

466-
break;
469+
return;
467470
}
468471

469472
if (hotSpot.Type == HotSpotType.Select)
470473
{
471-
hotSpot.Node.ToggleLevelOpen(hotSpot.Level);
472-
473-
Invalidate();
474-
475-
break;
474+
toggleNode = hotSpot.Node;
475+
level = hotSpot.Level;
476476
}
477477
}
478478
}
479+
480+
if (toggleNode != null)
481+
{
482+
toggleNode.ToggleLevelOpen(level);
483+
484+
Invalidate();
485+
}
479486
}
480487

481488
private Point toolTipPosition;

0 commit comments

Comments
 (0)