diff options
Diffstat (limited to 'options/tie.hpp')
-rw-r--r-- | options/tie.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/options/tie.hpp b/options/tie.hpp index a47dbd3d..accd958e 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -154,12 +154,18 @@ inline void tie_setting(value<slider_value>& v, QSlider* w) base_value::connect(w, &QSlider::valueChanged, &v, - [=, &v](int pos) { v = v->update_from_slider(pos, q_min, q_max); }, + [=, &v](int pos) { + v = v->update_from_slider(pos, q_min, q_max); + w->setValue(v->to_slider_pos(q_min, q_max)); + }, v.DIRECT_CONNTYPE); base_value::connect(&v, static_cast<void(base_value::*)(double) const>(&base_value::valueChanged), w, - [=, &v](double) { w->setValue(v->to_slider_pos(q_min, q_max)); }, + [=, &v](double) { + w->setValue(v->to_slider_pos(q_min, q_max)); + v = v->update_from_slider(w->value(), q_min, q_max); + }, v.SAFE_CONNTYPE); } |