main: auto switch to newly opened database

This commit is contained in:
mappu 2024-06-23 14:54:49 +12:00
parent 5992d19906
commit d674078071
4 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,7 @@ func (f *TMainForm) badgerAddDatabaseFromDirectory(path string) {
ld.nav.SetData(unsafe.Pointer(navData))
f.dbs = append(f.dbs, ld)
f.Buckets.SetSelected(ld.nav) // Select new element
ld.Keepalive(navData)
}

View File

@ -128,6 +128,7 @@ func (f *TMainForm) boltAddDatabaseFromFile(path string) {
ld.nav.SetData(unsafe.Pointer(navData))
f.dbs = append(f.dbs, ld)
f.Buckets.SetSelected(ld.nav) // Select new element
ld.Keepalive(navData)
}

View File

@ -215,6 +215,7 @@ func (f *TMainForm) redisConnect(opts *redis.Options) {
ld.nav.SetData(unsafe.Pointer(navData))
f.dbs = append(f.dbs, ld)
f.Buckets.SetSelected(ld.nav) // Select new element
ld.Keepalive(navData)
}

View File

@ -261,6 +261,7 @@ func (f *TMainForm) sqliteAddDatabaseFromFile(path string) {
ld.nav.SetData(unsafe.Pointer(navData))
f.dbs = append(f.dbs, ld)
f.Buckets.SetSelected(ld.nav) // Select new element
ld.Keepalive(navData)
}