diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-10 14:15:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-10 14:15:19 +0100 |
commit | 2d4f229370ca30bf1107705725c2df9db4c05e91 (patch) | |
tree | 04ecb02ac1aa2ae4bdb9ee6ab3e58a48e1576c7d /gui | |
parent | 104c24241a0fd5697ae1a6bf8c2ce5d29bf1ba97 (diff) |
gui: fix spline snap value harder
Was checking wrong variable.
Issue: #707
Diffstat (limited to 'gui')
-rw-r--r-- | gui/mapping-dialog.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index dc003e0a..68e61041 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -123,14 +123,16 @@ void MapWidget::load() qfc.force_redraw(); } - auto update_snap = [i, &conf, &qfc](int value) { + const int idx = qfcs[i].axis; + + auto update_snap = [idx, &conf, &qfc](int value) { //qfc.reload_spline(); qfc.set_x_step(value + 1e-2 >= 90 ? 10 : 5); - if (i >= 3) + if (idx >= 3) qfc.set_snap(1, 2.5); else - qfc.set_snap(.5, .5); + qfc.set_snap(.5, 1); }; connect(&axis.opts.clamp_x_, base_value::value_changed<int>(), &qfc, update_snap); |