summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-11-04 13:58:02 +0100
committerKevin Chabowski <kevin@kch42.de>2013-11-04 13:58:02 +0100
commit25135a163aeb6891614fd18e1a9316955ec3920a (patch)
tree30b35abf8ac3f51bc19d83577c3694964e841ffc
parentfd2bd4a1379c5b030bfab933678fa933d9c05245 (diff)
downloadbiomed-25135a163aeb6891614fd18e1a9316955ec3920a.tar.gz
biomed-25135a163aeb6891614fd18e1a9316955ec3920a.tar.bz2
biomed-25135a163aeb6891614fd18e1a9316955ec3920a.zip
onDel re-selects the current entry
-rw-r--r--biome_info_editor.go5
1 files changed, 4 insertions, 1 deletions
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()