sliders: take precision into account when checking if value has changed before canceling oscsend if false

This commit is contained in:
jean-emmanuel 2016-11-23 20:55:13 +01:00
parent aada9f615c
commit 32988a1f3b
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- error popups raised by the main process can be closed
- sliders don't send same value over network when the value change is below the widget's precision
## 0.11.6

View file

@ -148,7 +148,7 @@ _sliders_base.prototype.setValue = function(v,options={}) {
var value = clip(v,[this.rangeValsMin,this.rangeValsMax])
if ((options.dragged || options.fromLocal) && this.value == value) options.send = false
if ((options.dragged || options.fromLocal) && this.value.toFixed(this.widgetData.precision) == value.toFixed(this.widgetData.precision)) options.send = false
this.value = value