summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-03-13 23:41:52 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-03-13 23:41:52 +0100
commitc1a76c75df5ae4f0624d8456b336ecee2514c357 (patch)
tree8730bddac3ab487ef416a941ae90a6f38f1b1866
parent2706e1e10d324971f7c3991de0fff1fcc716fb00 (diff)
initialize "s_main" bundle implicitly
-rw-r--r--facetracknoir/ui.cpp6
-rw-r--r--opentrack/main-settings.hpp4
-rw-r--r--opentrack/shortcuts.h3
-rw-r--r--opentrack/state.hpp3
4 files changed, 6 insertions, 10 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 11ae5d3e..54e4646e 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -126,7 +126,7 @@ void MainWindow::save_mappings() {
#endif
void MainWindow::save() {
- b->save();
+ s.b->save();
save_mappings();
mem<QSettings> settings = group::ini_file();
settings->sync();
@@ -170,7 +170,7 @@ void MainWindow::load_mappings() {
}
void MainWindow::load_settings() {
- b->reload();
+ s.b->reload();
load_mappings();
}
@@ -212,7 +212,7 @@ void MainWindow::bindKeyboardShortcuts()
}
void MainWindow::startTracker( ) {
- b->save();
+ s.b->save();
load_settings();
bindKeyboardShortcuts();
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp
index 971e0fba..0468aeb1 100644
--- a/opentrack/main-settings.hpp
+++ b/opentrack/main-settings.hpp
@@ -30,8 +30,8 @@ struct main_settings {
value<bool> tray_enabled;
value<int> camera_yaw, camera_pitch;
value<bool> center_at_startup;
- main_settings(pbundle b) :
- b(b),
+ main_settings() :
+ b(bundle("opentrack-ui")),
tracker_dll(b, "tracker-dll", ""),
tracker2_dll(b, "tracker2-dll", ""),
filter_dll(b, "filter-dll", ""),
diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h
index 6989ea29..4d4b19d3 100644
--- a/opentrack/shortcuts.h
+++ b/opentrack/shortcuts.h
@@ -112,8 +112,7 @@ public:
b(bundle("keyboard-shortcuts")),
center(b, "center"),
toggle(b, "toggle"),
- zero(b, "zero"),
- s_main(bundle("opentrack-ui"))
+ zero(b, "zero")
{}
} s;
diff --git a/opentrack/state.hpp b/opentrack/state.hpp
index c8d97d16..2c37e5eb 100644
--- a/opentrack/state.hpp
+++ b/opentrack/state.hpp
@@ -35,13 +35,10 @@ struct Work;
struct State {
State() :
- b(bundle("opentrack-ui")),
- s(b),
pose(std::vector<axis_opts*>{&s.a_x, &s.a_y, &s.a_z, &s.a_yaw, &s.a_pitch, &s.a_roll})
{}
Modules modules;
SelectedLibraries libs;
- pbundle b;
main_settings s;
Mappings pose;
mem<Work> work;