summaryrefslogtreecommitdiff
path: root/plugingui/knob.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/knob.cc')
-rw-r--r--plugingui/knob.cc8
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;
}