PanelContainer: removed multiple comments

This commit is contained in:
Luke I. Wilson 2021-04-06 14:35:55 -05:00
parent 389276ee34
commit 459087e6d8

View File

@ -59,8 +59,6 @@ func (c *PanelContainer) DeleteSelected() Component {
(*c.selected).SetFocused(false) // Unfocus item (*c.selected).SetFocused(false) // Unfocus item
} }
// we're shifting panel right to left,
// need to focus left
if p != nil { if p != nil {
if *c.selected == (*p).Left { // If we're deleting the parent's Left if *c.selected == (*p).Left { // If we're deleting the parent's Left
(*p).Left = (*p).Right (*p).Left = (*p).Right
@ -69,18 +67,8 @@ func (c *PanelContainer) DeleteSelected() Component {
(*p).Right = nil (*p).Right = nil
} }
if (*p).Left != nil { // Left == panel ; SHOULD NOT BE PANEL if (*p).Left != nil {
// 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
panel := (*p).Left.(*Panel) panel := (*p).Left.(*Panel)
(*p).Left = (*panel).Left (*p).Left = (*panel).Left
(*p).Right = (*panel).Right (*p).Right = (*panel).Right
(*p).Kind = (*panel).Kind (*p).Kind = (*panel).Kind