summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/ui.cpp')
-rwxr-xr-xfacetracknoir/ui.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 7d8ae302..3f87ca2f 100755
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -80,6 +80,18 @@ MainWindow::MainWindow() :
tie_setting(s.protocol_dll, ui.iconcomboProtocol);
tie_setting(s.filter_dll, ui.iconcomboFilter);
+ connect(ui.iconcomboTrackerSource,
+ static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ [&](int) -> void { if (pTrackerDialog) pTrackerDialog = nullptr; });
+
+ connect(ui.iconcomboProtocol,
+ static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ [&](int) -> void { if (pProtocolDialog) pProtocolDialog = nullptr; });
+
+ connect(ui.iconcomboFilter,
+ static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ [&](int) -> void { if (pFilterDialog) pFilterDialog = nullptr; });
+
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));
connect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
@@ -270,22 +282,13 @@ void MainWindow::stopTracker( ) {
ui.pose_display->rotateBy(0, 0, 0, 0, 0, 0);
if (pTrackerDialog)
- {
pTrackerDialog->unregister_tracker();
- pTrackerDialog = nullptr;
- }
if (pProtocolDialog)
- {
pProtocolDialog->unregister_protocol();
- pProtocolDialog = nullptr;
- }
if (pFilterDialog)
- {
pFilterDialog->unregister_filter();
- pFilterDialog = nullptr;
- }
work = nullptr;
libs = SelectedLibraries();