1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Remove extraneous app.Draw() calls by having app.Draw() in its own routine

This commit is contained in:
Chris Cummer
2019-04-23 20:33:03 -07:00
parent f60ce6967d
commit a18625f427
5 changed files with 25 additions and 8 deletions

View File

@@ -150,9 +150,7 @@ func (tracker *FocusTracker) focus(idx int) {
view := widget.TextView()
view.SetBorderColor(ColorFor(Config.UString("wtf.colors.border.focused", "gray")))
tracker.App.SetFocus(view)
tracker.App.Draw()
}
func (tracker *FocusTracker) focusables() []Wtfable {

View File

@@ -33,5 +33,4 @@ func (widget *HelpfulWidget) ShowHelp() {
widget.pages.AddPage("help", modal, false, true)
widget.app.SetFocus(modal)
widget.app.Draw()
}

View File

@@ -45,10 +45,6 @@ func NewTextWidget(app *tview.Application, commonSettings *cfg.Common, focusable
widget.View = widget.addView()
widget.View.SetChangedFunc(func() {
app.Draw()
})
return widget
}