mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix race with HighlightableHelper
GetRect can lead to a race condition Add a RenderFunc method so that we can call try to wrap even more of our rendering in the thread safe `QueueUpdateDraw` method
This commit is contained in:
@@ -9,6 +9,10 @@ import (
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
widget.RedrawFunc(widget.content)
|
||||
}
|
||||
|
||||
func (widget *Widget) content() (string, string, bool) {
|
||||
str := ""
|
||||
newList := checklist.NewChecklist(
|
||||
widget.settings.common.Sigils.Checkbox.Checked,
|
||||
@@ -31,7 +35,7 @@ func (widget *Widget) display() {
|
||||
newList.SetSelectedByItem(widget.list.SelectedItem())
|
||||
widget.SetList(newList)
|
||||
|
||||
widget.Redraw(widget.CommonSettings().Title, str, false)
|
||||
return widget.CommonSettings().Title, str, false
|
||||
}
|
||||
|
||||
func (widget *Widget) formattedItemLine(idx int, item *checklist.ChecklistItem, selectedItem *checklist.ChecklistItem, maxLen int) string {
|
||||
|
||||
Reference in New Issue
Block a user