From be5c1fcafd0931cbc82178ea53d1d7207753139a Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sun, 8 Aug 2021 17:30:29 -0700 Subject: [PATCH] Draw application after updating root primitive via Application.SetRoot Resolves #77. --- CHANGELOG | 1 + application.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 142a39b..ecc04fb 100644 --- a/CHANGELOG +++ b/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 diff --git a/application.go b/application.go index 4266b94..dcc8e58 100644 --- a/application.go +++ b/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