summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-19 15:52:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-19 15:53:02 +0200
commitffefa511b474ed594a6a5bf5589aeae028f0bed2 (patch)
tree0389d7ac1cad216945b441ff2c22b6a34b05f855 /facetracknoir/ui.cpp
parent4332d0314165db508e1a5158350cdb34b688fef9 (diff)
ui: prevent clobbering current profile
Previously "open" always took to the topmost profile. Fixes #194
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 86996735..ac58cce8 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -111,8 +111,8 @@ void MainWindow::open() {
dir_path,
tr("Settings file (*.ini);;All Files (*)"));
set_working_directory();
-
- if (! fileName.isEmpty() ) {
+
+ if (!fileName.isEmpty()) {
{
QSettings settings(OPENTRACK_ORG);
settings.setValue(OPENTRACK_CONFIG_FILENAME_KEY, remove_app_path(fileName));
@@ -186,10 +186,10 @@ void MainWindow::fill_profile_combobox()
{
QStringList ini_list = group::ini_list();
set_title();
+ QString current = QFileInfo(group::ini_pathname()).fileName();
ui.iconcomboProfile->clear();
for (auto x : ini_list)
ui.iconcomboProfile->addItem(QIcon(":/images/settings16.png"), x);
- QString current = QFileInfo(group::ini_pathname()).fileName();
ui.iconcomboProfile->setCurrentText(current);
}