From 2d4f229370ca30bf1107705725c2df9db4c05e91 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 10 Dec 2017 14:15:19 +0100 Subject: gui: fix spline snap value harder Was checking wrong variable. Issue: #707 --- gui/mapping-dialog.cpp | 8 +++++--- 1 file 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(), &qfc, update_snap); -- cgit v1.2.3