diff options
-rw-r--r-- | facetracknoir/ui.cpp | 6 | ||||
-rw-r--r-- | facetracknoir/ui.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index 9fd4a91d..3d768d8b 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -49,6 +49,8 @@ MainWindow::MainWindow() : ui.iconcomboFilter->addItem(x->icon, x->name); refresh_config_list(); + connect(&config_list_timer, SIGNAL(timeout()), this, SLOT(refresh_config_list())); + config_list_timer.start(1000 * 3); tie_setting(s.tracker_dll, ui.iconcomboTrackerSource); tie_setting(s.protocol_dll, ui.iconcomboProtocol); @@ -76,7 +78,6 @@ MainWindow::MainWindow() : profile_menu.addAction("Create new empty config", this, SLOT(make_empty_config())); profile_menu.addAction("Create new copied config", this, SLOT(make_copied_config())); profile_menu.addAction("Open configuration directory", this, SLOT(open_config_directory())); - profile_menu.addAction("Refresh configuration list", this, SLOT(refresh_config_list())); ui.profile_button->setMenu(&profile_menu); kbd_quit.setEnabled(true); @@ -201,6 +202,9 @@ extern "C" volatile const char* opentrack_version; void MainWindow::refresh_config_list() { + if (work) + return; + if (group::ini_list().size() == 0) { QFile filename(group::ini_directory() + "/" OPENTRACK_DEFAULT_CONFIG); diff --git a/facetracknoir/ui.h b/facetracknoir/ui.h index 6d15e496..46a97b3f 100644 --- a/facetracknoir/ui.h +++ b/facetracknoir/ui.h @@ -40,6 +40,7 @@ class MainWindow : public QMainWindow, private State mem<QSystemTrayIcon> tray; QTimer pose_update_timer; QTimer det_timer; + QTimer config_list_timer; mem<OptionsDialog> options_widget; mem<MapWidget> mapping_widget; QShortcut kbd_quit; |