summaryrefslogtreecommitdiffhomepage
path: root/options/tie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/tie.cpp')
-rw-r--r--options/tie.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/options/tie.cpp b/options/tie.cpp
index 1f2d7dae..671a72c2 100644
--- a/options/tie.cpp
+++ b/options/tie.cpp
@@ -8,6 +8,11 @@
#include "tie.hpp"
#include "compat/run-in-thread.hpp"
+#include "compat/macros.hpp"
+
+#include "value-traits.hpp"
+
+#include <cmath>
namespace options {
@@ -141,9 +146,9 @@ void tie_setting(value<slider_value>& v, QSlider* w)
{
const int q_min = w->minimum();
const int q_max = w->maximum();
- const int pos = v().to_slider_pos(q_min, q_max);
+ const int pos = v->to_slider_pos(q_min, q_max);
+ v = v->update_from_slider(pos, q_min, q_max);
w->setValue(pos);
- v = v().update_from_slider(w->value(), q_min, q_max);
});
},
v.DIRECT_CONNTYPE);