From 164f8d8d473e571086583d86bb4ff9982abe54b4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 26 Sep 2016 13:14:16 +0200 Subject: gui, options: prevent options reset on tracker stop They should only be reset when closing the module dialog window. This is a hack but otherwise we'd have to change all the modules. Issue: #466 Closes #466 --- gui/main-window.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gui/main-window.cpp') diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 1730a806..43b7158b 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -474,7 +474,7 @@ void MainWindow::stopTracker() if (!work) return; - //ui.game_name->setText("Not connected"); + opts::set_teardown_flag(true); // XXX hack -sh 20160926 pose_update_timer.stop(); ui.pose_display->rotateBy_real(0, 0, 0, 0, 0, 0); @@ -488,8 +488,6 @@ void MainWindow::stopTracker() if (pFilterDialog) pFilterDialog->unregister_filter(); - save_modules(); - work = nullptr; libs = SelectedLibraries(); @@ -497,10 +495,11 @@ void MainWindow::stopTracker() double p[6] = {0,0,0, 0,0,0}; display_pose(p, p); } - updateButtonState(false, false); - set_title(); + opts::set_teardown_flag(false); // XXX hack -sh 20160926 + updateButtonState(false, false); + set_title(); ui.btnStartTracker->setFocus(); } -- cgit v1.2.3