diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 15:54:01 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 14:35:29 +0000 |
commit | f0216a3c53d43918295f1bd81975b391f4e5ed3b (patch) | |
tree | b6311d48559bbdb4b657beed1bd8164d9157b03f /options/tie.cpp | |
parent | 39ea3871c1b3f594df846bc0b9a627c9880ecea4 (diff) |
options: don't use typeindex w/ lambdas
Rename traits' functions to be more explicit.
Most of the changes are pretty old and I can't read
them at this time, sorry.
Adjust usages.
Issue: #825
Reported-by: @DanielKinsman
Diffstat (limited to 'options/tie.cpp')
-rw-r--r-- | options/tie.cpp | 9 |
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); |