diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-03 17:01:32 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-03 17:01:32 +0200 | 
| commit | 6919231923167c04ce8788eee6deb12d8268e89c (patch) | |
| tree | 7a02c81bf76e149d211a22cc88d726fb14cd5f98 | |
| parent | e5598d9d15a6e7a91d3aaae9efce2c1e115a0267 (diff) | |
ui: simplify protocol load failure logic
| -rw-r--r-- | facetracknoir/ui.cpp | 7 | 
1 files changed, 5 insertions, 2 deletions
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<Work>(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<Work>(s, pose, libs, this, winId()); +     +    bindKeyboardShortcuts(); +          if (pTrackerDialog)          pTrackerDialog->register_tracker(libs.pTracker.get());  | 
