diff options
-rw-r--r-- | plugingui/knob.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugingui/knob.cc b/plugingui/knob.cc index aaf9735..3d09d51 100644 --- a/plugingui/knob.cc +++ b/plugingui/knob.cc @@ -150,8 +150,12 @@ void Knob::buttonEvent(ButtonEvent* buttonEvent) return; } - if (buttonEvent->doubleClick) { - internalSetValue(default_value); + if(buttonEvent->doubleClick) + { + float value = default_value; + value -= minimum; + value /= (maximum - minimum); + internalSetValue(value); return; } |