diff options
Diffstat (limited to 'lib/ui/grid.go')
-rw-r--r-- | lib/ui/grid.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ui/grid.go b/lib/ui/grid.go index f36a16ac..5011a818 100644 --- a/lib/ui/grid.go +++ b/lib/ui/grid.go @@ -181,10 +181,10 @@ func (grid *Grid) AddChild(content Drawable) *GridCell { return cell } -func (grid *Grid) RemoveChild(cell *GridCell) { +func (grid *Grid) RemoveChild(content Drawable) { grid.mutex.Lock() - for i, _cell := range grid.cells { - if _cell == cell { + for i, cell := range grid.cells { + if cell.Content == content { grid.cells = append(grid.cells[:i], grid.cells[i+1:]...) break } |