summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/curve-config.cpp32
-rw-r--r--gui/curve-config.h1
2 files changed, 19 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() {
diff --git a/gui/curve-config.h b/gui/curve-config.h
index 04a25ab4..33ce90fd 100644
--- a/gui/curve-config.h
+++ b/gui/curve-config.h
@@ -8,6 +8,7 @@ class MapWidget: public QWidget
Q_OBJECT
public:
MapWidget(Mappings &m);
+ void reload();
private:
Ui::UICCurveConfigurationDialog ui;
Mappings& m;