From 3657d2c0d9807d6f88378981513a944cce4a1a16 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 29 Jun 2016 10:37:15 +0200 Subject: logic, gui: no need to reference "struct main_settings" Now that "struct main_settings" doesn't implicitly reload in dtor, we no longer have to pass it around from the user interface. Only reload it where it's modified, i.e. in the options dialog. Changing the filter/dialog/mapping comboboxen implicitly saves the main options however. --- gui/curve-config.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gui/curve-config.cpp') diff --git a/gui/curve-config.cpp b/gui/curve-config.cpp index 61459c1c..3b56dbb8 100644 --- a/gui/curve-config.cpp +++ b/gui/curve-config.cpp @@ -8,7 +8,7 @@ #include "curve-config.h" #include "opentrack-logic/main-settings.hpp" -MapWidget::MapWidget(Mappings& m, main_settings& s) : +MapWidget::MapWidget(Mappings& m) : m(m) { ui.setupUi( this ); @@ -68,6 +68,8 @@ MapWidget::MapWidget(Mappings& m, main_settings& s) : connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); + main_settings s; + tie_setting(s.a_x.altp, ui.tx_altp); tie_setting(s.a_y.altp, ui.ty_altp); tie_setting(s.a_z.altp, ui.tz_altp); -- cgit v1.2.3