diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:01:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:18:30 +0200 |
commit | 2eccd41897d6794a80b3ed2fcaaded85c453d46d (patch) | |
tree | e18781bc267899dc093594e1915d17a0fa05db9d /gui/curve-config.cpp | |
parent | 3657d2c0d9807d6f88378981513a944cce4a1a16 (diff) |
gui/mapping: reload mapping on profile change
Diffstat (limited to 'gui/curve-config.cpp')
-rw-r--r-- | gui/curve-config.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/gui/curve-config.cpp b/gui/curve-config.cpp index 3b56dbb8..19237c3c 100644 --- a/gui/curve-config.cpp +++ b/gui/curve-config.cpp @@ -13,9 +13,26 @@ MapWidget::MapWidget(Mappings& m) : { ui.setupUi( this ); - // rest of mapping settings taken care of by options::value<t> m.load_mappings(); + reload(); + + setFont(qApp->font()); + 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); + tie_setting(s.a_yaw.altp, ui.rx_altp); + tie_setting(s.a_pitch.altp, ui.ry_altp); + tie_setting(s.a_roll.altp, ui.rz_altp); +} + +void MapWidget::reload() +{ { struct { QFunctionConfigurator* qfc; @@ -63,19 +80,6 @@ MapWidget::MapWidget(Mappings& m) : qfcs[i].qfc->setConfig(conf, name); } } - - setFont(qApp->font()); - 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); - tie_setting(s.a_yaw.altp, ui.rx_altp); - tie_setting(s.a_pitch.altp, ui.ry_altp); - tie_setting(s.a_roll.altp, ui.rz_altp); } void MapWidget::doOK() { |