aboutsummaryrefslogtreecommitdiffstats
path: root/gui/widget/output.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-05-12 17:19:49 -0400
committerSam Anthony <sam@samanthony.xyz>2024-05-12 17:19:49 -0400
commit0f90df6e1acbd2e3d085438c3a4851b6297dcd34 (patch)
tree1f3890454cbf3b0e52488707d4e7fc7b40eaf203 /gui/widget/output.go
parent9dd70a042702b26b17086a4cf5bf478f34529c9c (diff)
downloadvolute-faiface.zip
remove unnecessary loop labelsfaiface
Diffstat (limited to 'gui/widget/output.go')
-rw-r--r--gui/widget/output.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/gui/widget/output.go b/gui/widget/output.go
index 16aacca..8bd25b1 100644
--- a/gui/widget/output.go
+++ b/gui/widget/output.go
@@ -17,14 +17,13 @@ func Output(val <-chan float64, r image.Rectangle, env gui.Env, wg *sync.WaitGro
var v float64 = 0.0
env.Draw() <- outputDraw(v, r)
-Loop:
for {
select {
case v = <-val:
env.Draw() <- outputDraw(v, r)
case event, ok := <-env.Events():
- if !ok { // channel closed
- break Loop
+ if !ok {
+ return
}
if event, ok := event.(win.WiFocus); ok && event.Focused {
env.Draw() <- outputDraw(v, r)