summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-30 08:48:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-30 08:49:43 +0200
commit8b08d5800354a5dcedfd7811447ea76e09c31d03 (patch)
treeabe44b6cc28c616bd47459f90da4713b4c564ae3 /facetracknoir/ui.cpp
parentbe000a8a9aad1d6804ee27b02b12b531029427cb (diff)
ui: save profile when combobox text changes, not merely index
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 7b84de72..0c104553 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -71,7 +71,7 @@ MainWindow::MainWindow() :
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));
- connect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
+ connect(ui.iconcomboProfile, SIGNAL(currentTextChanged(QString)), this, SLOT(profileSelected(QString)));
connect(&pose_update_timer, SIGNAL(timeout()), this, SLOT(showHeadPose()));
connect(&kbd_quit, SIGNAL(activated()), this, SLOT(exit()));
@@ -434,13 +434,13 @@ void MainWindow::exit() {
QCoreApplication::exit(0);
}
-void MainWindow::profileSelected(int index)
+void MainWindow::profileSelected(QString name)
{
- if (index == -1 || is_refreshing_profiles)
+ if (name == "" || is_refreshing_profiles)
return;
const auto old_name = group::ini_filename();
- const auto new_name = ui.iconcomboProfile->itemText(index);
+ const auto new_name = name;
if (old_name != new_name)
{