From 459087e6d817afe48a8831fd6487e48979da8346 Mon Sep 17 00:00:00 2001 From: "Luke I. Wilson" Date: Tue, 6 Apr 2021 14:35:55 -0500 Subject: [PATCH] PanelContainer: removed multiple comments --- ui/panelcontainer.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ui/panelcontainer.go b/ui/panelcontainer.go index a22c0a0..e433a1c 100755 --- a/ui/panelcontainer.go +++ b/ui/panelcontainer.go @@ -59,8 +59,6 @@ func (c *PanelContainer) DeleteSelected() Component { (*c.selected).SetFocused(false) // Unfocus item } - // we're shifting panel right to left, - // need to focus left if p != nil { if *c.selected == (*p).Left { // If we're deleting the parent's Left (*p).Left = (*p).Right @@ -69,18 +67,8 @@ func (c *PanelContainer) DeleteSelected() Component { (*p).Right = nil } - if (*p).Left != nil { // Left == panel ; SHOULD NOT BE PANEL - // asserting left is panel: - // if left is not a Leaf !.IsLeaf(): - // make the parent match the left: - // p.Left = panel's Left - // p.Right = panel's Right - // p.Kind = panel's kind - // else: - // parent left = panel's left - // parent's kind = panel's kind + if (*p).Left != nil { panel := (*p).Left.(*Panel) - (*p).Left = (*panel).Left (*p).Right = (*panel).Right (*p).Kind = (*panel).Kind