hidden still not working in window redraw
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
ab1c90e93e
commit
00a0184918
|
@ -34,6 +34,9 @@ func action(a widget.Action) {
|
||||||
} else {
|
} else {
|
||||||
w.setColor(&colorDisabled)
|
w.setColor(&colorDisabled)
|
||||||
}
|
}
|
||||||
|
if w.hidden {
|
||||||
|
w.SetVisible(false)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// this is done to protect the plugin being 'refreshed' with the
|
// this is done to protect the plugin being 'refreshed' with the
|
||||||
// widget binary tree. TODO: find a way to keep them in sync
|
// widget binary tree. TODO: find a way to keep them in sync
|
||||||
|
@ -41,6 +44,7 @@ func action(a widget.Action) {
|
||||||
a.WidgetId, a.ActionType, a.WidgetType, a.ProgName)
|
a.WidgetId, a.ActionType, a.WidgetType, a.ProgName)
|
||||||
}
|
}
|
||||||
case widget.Show:
|
case widget.Show:
|
||||||
|
w.node.State.Hidden = false
|
||||||
if w.Visible() {
|
if w.Visible() {
|
||||||
// widget was already shown
|
// widget was already shown
|
||||||
} else {
|
} else {
|
||||||
|
@ -49,6 +53,9 @@ func action(a widget.Action) {
|
||||||
}
|
}
|
||||||
w.showView()
|
w.showView()
|
||||||
case widget.Hide:
|
case widget.Hide:
|
||||||
|
w.node.State.Hidden = true
|
||||||
|
log.Log(NOW, "HIDE HERE. a.State.Hidden =", a.State.Hidden)
|
||||||
|
log.Log(NOW, "HIDE HERE. w.hidden =", w.hidden)
|
||||||
if w.Visible() {
|
if w.Visible() {
|
||||||
log.Log(INFO, "Setting Visible to false", a.ProgName)
|
log.Log(INFO, "Setting Visible to false", a.ProgName)
|
||||||
w.SetVisible(false)
|
w.SetVisible(false)
|
||||||
|
|
5
view.go
5
view.go
|
@ -62,6 +62,11 @@ func (w *guiWidget) showView() {
|
||||||
}
|
}
|
||||||
log.Log(INFO, "showView() labelN =", w.labelN)
|
log.Log(INFO, "showView() labelN =", w.labelN)
|
||||||
|
|
||||||
|
if w.hidden {
|
||||||
|
w.SetVisible(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// if the gocui element doesn't exist, create it
|
// if the gocui element doesn't exist, create it
|
||||||
if w.v == nil {
|
if w.v == nil {
|
||||||
w.recreateView()
|
w.recreateView()
|
||||||
|
|
Loading…
Reference in New Issue