diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-28 13:49:29 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-28 13:49:59 +0200 |
commit | f3708cf6a85f4447e2333642453a4a0232986942 (patch) | |
tree | 04483942f37f22e6551f3d1488f2beece9123708 /opentrack | |
parent | e07a72493f6145b55efb305c955032ffd73e94c3 (diff) |
save axis opts, not just spline control points
This caused the "invert axis got switched on" bug.
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/main-settings.hpp | 2 | ||||
-rw-r--r-- | opentrack/mappings.hpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp index 8c49f86a..b973e7af 100644 --- a/opentrack/main-settings.hpp +++ b/opentrack/main-settings.hpp @@ -15,10 +15,12 @@ using namespace options; struct axis_opts { + pbundle b; value<double> zero; value<bool> invert, altp; value<int> src; axis_opts(pbundle b, QString pfx, int idx) : + b(b), zero(b, n(pfx, "zero-pos"), 0), invert(b, n(pfx, "invert-sign"), false), altp(b, n(pfx, "alt-axis-sign"), false), diff --git a/opentrack/mappings.hpp b/opentrack/mappings.hpp index 85d9900c..2391efd1 100644 --- a/opentrack/mappings.hpp +++ b/opentrack/mappings.hpp @@ -62,6 +62,7 @@ public: { axes[i].curve.loadSettings(*iniFile, axes[i].name1); axes[i].curveAlt.loadSettings(*iniFile, axes[i].name2); + axes[i].opts.b->reload(); } } void save_mappings() @@ -72,6 +73,7 @@ public: { axes[i].curve.saveSettings(*iniFile, axes[i].name1); axes[i].curveAlt.saveSettings(*iniFile, axes[i].name2); + axes[i].opts.b->save(); } } @@ -81,6 +83,7 @@ public: { axes[i].curve.invalidate_unsaved_settings(); axes[i].curveAlt.invalidate_unsaved_settings(); + axes[i].opts.b->reload(); } } }; |