correctly check for no tabs before Destory()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-06-17 14:45:42 -07:00
parent e00cbad32e
commit 04c9f6d89d
1 changed files with 7 additions and 1 deletions

View File

@ -144,7 +144,13 @@ func DeleteWindow(name string) {
tab := *window.TabNumber tab := *window.TabNumber
log.Println("gui.DumpBoxes() \tWindows.TabNumber =", tab) log.Println("gui.DumpBoxes() \tWindows.TabNumber =", tab)
log.Println("gui.DumpBoxes() \tSHOULD DELETE TAB", tab, "HERE") log.Println("gui.DumpBoxes() \tSHOULD DELETE TAB", tab, "HERE")
log.Println("gui.DeleteWindow() \tSHOULD DELETE TAB", tab, "HERE")
log.Println("gui.DumpBoxes() \tUiTab =", window.UiTab)
tabnum := window.UiTab.NumPages()
log.Println("gui.DumpBoxes() \tUiTab.NumPages() =", tabnum)
if (tabnum > 0) {
window.UiTab.Delete(tab) window.UiTab.Delete(tab)
}
delete(Data.WindowMap, name) delete(Data.WindowMap, name)
// renumber tabs here // renumber tabs here