Skip to content

Commit af46a38

Browse files
committed
save
1 parent 52ac159 commit af46a38

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

pkg/eventbus/eventbus.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ func (e *Controller) SubscribeFunc(topic string, fn func(float64)) (cancel func(
234234
respChan := e.Subscribe(topic)
235235
go func() {
236236
for v := range respChan {
237+
//fyne.DoAsync(func() {
237238
fn(v)
239+
//})
238240
}
239241
}()
240242
cancel = func() {

pkg/widgets/dial/dial.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,6 @@ func (c *Dial) SetValue(value float64) {
141141
fmt.Fprintf(&c.buf, c.displayString, value)
142142
c.displayText.Text = c.buf.String()
143143
c.displayText.Refresh()
144-
145-
/*
146-
if value > c.highestObserved || time.Since(c.lastHighestObserved) > 10*time.Second {
147-
c.highestObserved = value
148-
c.rotateNeedle(c.highestObservedMarker, c.highestObserved, c.radius, c.eightRadius*0.5)
149-
c.lastHighestObserved = time.Now()
150-
}
151-
*/
152144
}
153145

154146
func (c *Dial) SetValue2(value float64) {

pkg/widgets/logplayer/logplayer.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ func (l *Logplayer) playLog() {
391391
}
392392
l.objs.positionSlider.Value = float64(op.Pos)
393393
timeText := rec.Time.Format("15:04:05.00")
394-
//fyne.Do(func() {
394+
//fyne.DoAsync(func() {
395395
l.objs.positionSlider.Refresh()
396396
l.objs.timeLabel.SetText(timeText)
397397
//})
@@ -419,7 +419,7 @@ func (l *Logplayer) playLog() {
419419
}
420420
l.objs.positionSlider.Value = float64(pos)
421421
timeText := rec.Time.Format("15:04:05.00")
422-
//fyne.Do(func() {
422+
//fyne.DoAsync(func() {
423423
l.objs.positionSlider.Refresh()
424424
l.objs.timeLabel.SetText(timeText)
425425
//})
@@ -441,7 +441,7 @@ func (l *Logplayer) playLog() {
441441

442442
l.objs.positionSlider.Value = float64(pos + 1)
443443
timeText := rec.Time.Format("15:04:05.00")
444-
//fyne.Do(func() {
444+
//fyne.DoAsync(func() {
445445
l.objs.positionSlider.Refresh()
446446
l.objs.timeLabel.SetText(timeText)
447447
//})
@@ -482,10 +482,11 @@ func (l *Logplayer) playLog() {
482482
}
483483

484484
l.objs.positionSlider.Value = float64(currentPos)
485+
timeText := rec.Time.Format("15:04:05.00")
485486

486-
//fyne.Do(func() {
487+
//fyne.DoAsync(func() {
487488
l.objs.positionSlider.Refresh()
488-
l.objs.timeLabel.SetText(rec.Time.Format("15:04:05.00"))
489+
l.objs.timeLabel.SetText(timeText)
489490
//})
490491

491492
if f := l.cfg.TimeSetter; f != nil {

pkg/widgets/plotter/plotter.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (p *Plotter) Seek(pos int) {
237237
valueIndex := min(p.dataLength, p.cursorPos)
238238
obj := p.legendTexts[i]
239239
obj.value.Text = fmt.Sprintf("%g", p.values[v][valueIndex])
240-
//fyne.Do(func() {
240+
//fyne.DoAsync(func() {
241241
obj.Refresh()
242242
//})
243243
}
@@ -263,8 +263,10 @@ func (p *Plotter) refreshImage() {
263263
// write the text of the current value in the top left corner of the image
264264
}
265265

266+
//fyne.DoAsync(func() {
266267
p.canvasImage.Image = img
267268
p.canvasImage.Refresh()
269+
//})
268270

269271
}
270272

pkg/windows/mainWindow.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ func (mw *MainWindow) LoadLogfileCombined(filename string, p fyne.Position, from
398398
//}
399399

400400
do := func() {
401-
402401
w := mw.app.NewWindow(fp)
403402
w.SetCloseIntercept(func() {
404403
cp.Close()

0 commit comments

Comments
 (0)