From 6919231923167c04ce8788eee6deb12d8268e89c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 3 Jul 2015 17:01:32 +0200 Subject: ui: simplify protocol load failure logic --- facetracknoir/ui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'facetracknoir/ui.cpp') diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index 33ff6ecd..10445182 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -215,13 +215,11 @@ void MainWindow::bindKeyboardShortcuts() void MainWindow::startTracker() { s.b->save(); load_settings(); - bindKeyboardShortcuts(); // tracker dtor needs run first work = nullptr; libs = SelectedLibraries(ui.video_frame, current_tracker(), current_protocol(), current_filter()); - work = std::make_shared(s, pose, libs, this, winId()); { double p[6] = {0,0,0, 0,0,0}; @@ -234,9 +232,14 @@ void MainWindow::startTracker() { "One of libraries failed to load. Check installation.", QMessageBox::Ok, QMessageBox::NoButton); + libs = SelectedLibraries(); return; } + work = std::make_shared(s, pose, libs, this, winId()); + + bindKeyboardShortcuts(); + if (pTrackerDialog) pTrackerDialog->register_tracker(libs.pTracker.get()); -- cgit v1.2.3