From 25135a163aeb6891614fd18e1a9316955ec3920a Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Mon, 4 Nov 2013 13:58:02 +0100 Subject: onDel re-selects the current entry --- biome_info_editor.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/biome_info_editor.go b/biome_info_editor.go index 8b47308..f4f23cd 100644 --- a/biome_info_editor.go +++ b/biome_info_editor.go @@ -234,7 +234,7 @@ func (bl *biomeList) onAdd() { } func (bl *biomeList) onDel() { - idx, iter, _ := bl.treeviewIdx() + idx, iter, path := bl.treeviewIdx() if idx < 0 { return } @@ -243,6 +243,9 @@ func (bl *biomeList) onDel() { bl.biomes = bl.biomes[:len(bl.biomes)-1] bl.lStore.Remove(iter) + if len(bl.biomes) > 0 { + bl.treeview.SetCursor(path, nil, false) + } } func (bl *biomeList) onUp() { idx, iter, path := bl.treeviewIdx() -- cgit v1.2.3-70-g09d2