From f3708cf6a85f4447e2333642453a4a0232986942 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Aug 2015 13:49:29 +0200 Subject: save axis opts, not just spline control points This caused the "invert axis got switched on" bug. --- opentrack/main-settings.hpp | 2 ++ opentrack/mappings.hpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'opentrack') 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 zero; value invert, altp; value 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(); } } }; -- cgit v1.2.3