diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-22 11:04:33 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-22 11:04:33 +0200 |
commit | e02d939c269d0a1b0d387b74f1d767e7c65c14b8 (patch) | |
tree | 9b901a65ef14f387e739b3572b37a576915de405 /facetracknoir | |
parent | 6296a266c6c4c468c9d35117b31651c065b62dad (diff) |
close dialogs on switch to new module
Don't preemptively close dialog on tracking stop, that's annoying for
users.
Diffstat (limited to 'facetracknoir')
-rwxr-xr-x | facetracknoir/ui.cpp | 21 |
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(); |