Browse Source

Draw application after updating root primitive via Application.SetRoot

Resolves #77.
master
Trevor Slocum 4 months ago
parent
commit
be5c1fcafd
  1. 1
      CHANGELOG
  2. 4
      application.go

1
CHANGELOG

@ -5,6 +5,7 @@ v1.5.7 (WIP)
- Fix TextView.GetRegionText error when text contains color tags
- Fix TextView region tags when placed at the end of a line
- Do not customize Modal window styling by default (use GetForm and GetFrame to customize)
- Draw application after updating root primitive via Application.SetRoot
v1.5.6 (2020-07-08)
- Add TrueColorTags option and do not use TrueColor tag values by default

4
application.go

@ -762,7 +762,7 @@ func (a *Application) GetAfterDrawFunc() func(screen tcell.Screen) {
// This function must be called at least once or nothing will be displayed when
// the application starts.
//
// It also calls SetFocus() on the primitive.
// It also calls SetFocus() on the primitive and draws the application.
func (a *Application) SetRoot(root Primitive, fullscreen bool) {
a.Lock()
a.root = root
@ -773,6 +773,8 @@ func (a *Application) SetRoot(root Primitive, fullscreen bool) {
a.Unlock()
a.SetFocus(root)
a.Draw()
}
// ResizeToFullScreen resizes the given primitive such that it fills the entire

Loading…
Cancel
Save