Skip to content

Commit

Permalink
don't call Refresh if slider.Value has not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
fpabl0 committed Mar 23, 2021
1 parent b307cea commit 59192e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion widget/slider.go
Expand Up @@ -103,9 +103,14 @@ func (s *Slider) Dragged(e *fyne.DragEvent) {
lastValue := s.Value

s.updateValue(ratio)

if lastValue == s.Value {
return
}

s.Refresh()

if s.OnChanged != nil && lastValue != s.Value {
if s.OnChanged != nil {
s.OnChanged(s.Value)
}
}
Expand Down

0 comments on commit 59192e8

Please sign in to comment.