aboutsummaryrefslogtreecommitdiff
path: root/src/settingsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settingsdialog.cpp')
-rw-r--r--src/settingsdialog.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
index f2c6307..ebd1664 100644
--- a/src/settingsdialog.cpp
+++ b/src/settingsdialog.cpp
@@ -185,12 +185,13 @@ void SettingsDialog::setOptions(const GenericSettings &options)
{
this->current_options = options;
- if(this->current_options.theme == Theme::light)
- this->ui->ui_theme->setCurrentIndex(0);
- else if(this->current_options.theme == Theme::dark)
- this->ui->ui_theme->setCurrentIndex(1);
- else
- this->ui->ui_theme->setCurrentIndex(0);
+ this->ui->ui_theme->setCurrentIndex(0);
+ for(int i = 0; i < this->ui->ui_theme->count(); i++) {
+ if(this->ui->ui_theme->itemData(i).toInt() == int(options.theme)) {
+ this->ui->ui_theme->setCurrentIndex(i);
+ break;
+ }
+ }
this->ui->start_page->setText(this->current_options.start_page);