diff options
Diffstat (limited to 'lib')
-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 f36a16a..5011a81 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 } |