correctly check for no tabs before Destory()
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e00cbad32e
commit
04c9f6d89d
|
@ -144,7 +144,13 @@ func DeleteWindow(name string) {
|
|||
tab := *window.TabNumber
|
||||
log.Println("gui.DumpBoxes() \tWindows.TabNumber =", tab)
|
||||
log.Println("gui.DumpBoxes() \tSHOULD DELETE TAB", tab, "HERE")
|
||||
window.UiTab.Delete(tab)
|
||||
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)
|
||||
}
|
||||
delete(Data.WindowMap, name)
|
||||
|
||||
// renumber tabs here
|
||||
|
|
Loading…
Reference in New Issue