Skip to content

Commit

Permalink
fix setting persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
smanolloff committed Oct 10, 2024
1 parent 7202c89 commit a402dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion launcher/settingsView/csettingsview_moc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void CSettingsView::loadSettings()
auto setValue = [](QComboBox * box, std::string value) {
auto qstr = QString::fromStdString(value);
int index = box->findData(qstr);
box->setCurrentIndex(index >= 0 ? index : 0);
index >= 0 ? box->setCurrentIndex(index) : box->setCurrentText(qstr);
};

setValue(ui->comboBoxFriendlyAI, settings["server"]["friendlyAI"].String());
Expand Down

0 comments on commit a402dfc

Please sign in to comment.