gui: fix icons going missing when selecting in nav tree

This commit is contained in:
mappu 2024-06-15 11:43:36 +12:00
parent 3731ee1781
commit 79bce40581
2 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,7 @@ func (f *TMainForm) boltAddDatabaseFromFile(path string) {
ld.nav = f.Buckets.Items().Add(nil, ld.displayName)
ld.nav.SetHasChildren(true) // dynamically populate in OnNavExpanding
ld.nav.SetImageIndex(imgDatabase)
ld.nav.SetSelectedIndex(imgDatabase)
navData := &navData{
ld: ld,
childrenLoaded: false, // will be loaded dynamically

View File

@ -206,6 +206,7 @@ func (f *TMainForm) sqliteAddDatabaseFromFile(path string) {
ld.nav = f.Buckets.Items().Add(nil, ld.displayName)
ld.nav.SetImageIndex(imgDatabase)
ld.nav.SetSelectedIndex(imgDatabase)
ld.nav.SetHasChildren(true) // dynamically populate in OnNavExpanding
navData := &navData{
ld: ld,