Skip to content

Commit

Permalink
Merge pull request #1164 from cogentcore/goupdt
Browse files Browse the repository at this point in the history
time.sleep needs to run even for invisible -- allows inner-loop …
  • Loading branch information
kkoreilly authored Aug 21, 2024
2 parents a6c3cd0 + 9add676 commit fb9f1f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plot/plotcore/ploteditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ func (pl *PlotEditor) GoUpdatePlot() {
if pl == nil || pl.This == nil {
return
}
if core.TheApp.Platform() == system.Web {
time.Sleep(time.Millisecond) // critical to prevent hanging!
}
if !pl.IsVisible() || pl.table == nil || pl.table.Table == nil || pl.inPlot {
return
}
Expand All @@ -286,9 +289,6 @@ func (pl *PlotEditor) GoUpdatePlot() {
pl.genPlot()
pl.NeedsRender()
pl.Scene.AsyncUnlock()
if core.TheApp.Platform() == system.Web {
time.Sleep(time.Millisecond) // critical to prevent hanging!
}
}

// UpdatePlot updates the display based on current IndexView into table.
Expand Down

0 comments on commit fb9f1f0

Please sign in to comment.