From c39117d132dcba6efe484faaa0144facda990c21 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 12 Feb 2024 15:22:17 -0600 Subject: [PATCH] correct initial hidden state --- basicWindow.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basicWindow.go b/basicWindow.go index 09fd928..ac6d5eb 100644 --- a/basicWindow.go +++ b/basicWindow.go @@ -26,6 +26,7 @@ func RawBasicWindow(title string) *BasicWindow { w = &BasicWindow{ title: title, vertical: false, + hidden: true, } log.Log(GADGETS, "NewBasicWindow() END") @@ -167,10 +168,10 @@ func (w *BasicWindow) Horizontal() { log.Log(GADGETS, "BasicWindow() Horizontal() END w.vertical =", w.vertical, w.title) } -func (w *BasicWindow) Make() { +func (w *BasicWindow) Make() *BasicWindow { if w.win != nil { - log.Log(GADGETS, "BasicWindow.Make() window was already created") - return + log.Warn("BasicWindow.Make() window was already created") + return w } // w.win = w.parent.RawWindow(w.title) w.win = gui.RawWindow(w.title) @@ -197,6 +198,7 @@ func (w *BasicWindow) Make() { w.win.SetVisable(false) w.ready = true + return w } func (w *BasicWindow) TestDraw() {