summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/facetracknoir.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-22 14:17:27 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-22 14:17:27 +0200
commit79d524cadcbb2ad68e57694fab0e46ba81f748e8 (patch)
treee6d43652b282b9938f6c6ea143153799e261d8f5 /facetracknoir/facetracknoir.cpp
parent60813dce0d8282fb36c1730fd83bb0e9ee61bdce (diff)
simplify current t/p/f getter
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r--facetracknoir/facetracknoir.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index ac2ea39f..afed886c 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -227,7 +227,6 @@ void FaceTrackNoIR::startTracker( ) {
return;
}
- ui.video_frame->show();
pose_update_timer.start(50);
// NB check valid since SelectedLibraries ctor called
@@ -331,9 +330,8 @@ ptr<t> mk_dialog(ptr<dylib> lib)
void FaceTrackNoIR::showTrackerSettings()
{
- int idx = ui.iconcomboTrackerSource->currentIndex();
- auto dialog = mk_dialog<ITrackerDialog>(modules.trackers().value(idx, nullptr));
-
+ auto dialog = mk_dialog<ITrackerDialog>(current_tracker());
+
if (dialog) {
pTrackerDialog = dialog;
dialog->register_tracker(libs.pTracker.get());
@@ -342,9 +340,8 @@ void FaceTrackNoIR::showTrackerSettings()
}
void FaceTrackNoIR::showProtocolSettings() {
- int idx = ui.iconcomboProtocol->currentIndex();
- auto dialog = mk_dialog<IProtocolDialog>(modules.protocols().value(idx, nullptr));
-
+ auto dialog = mk_dialog<IProtocolDialog>(current_protocol());
+
if (dialog) {
pProtocolDialog = dialog;
dialog->show();
@@ -352,9 +349,8 @@ void FaceTrackNoIR::showProtocolSettings() {
}
void FaceTrackNoIR::showFilterSettings() {
- int idx = ui.iconcomboFilter->currentIndex();
- auto dialog = mk_dialog<IFilterDialog>(modules.filters().value(idx, nullptr));
-
+ auto dialog = mk_dialog<IFilterDialog>(current_filter());
+
if (dialog) {
pFilterDialog = dialog;
dialog->register_filter(libs.pFilter.get());