mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
FEXConfig: Fix string list handling
This commit is contained in:
1 parent
73a32ff22c
commit
11f9135be6
1 file changed
+5
-1
@@ -78,6 +78,10 @@ void ConfigModel::Reload() {
|
||||
if (!LoadedConfig->OptionExists(Option.first)) {
|
||||
continue;
|
||||
}
|
||||
if (std::holds_alternative<fextl::list<fextl::string>>(Option.second)) {
|
||||
// Omit string lists from the model since they require special handling
|
||||
continue;
|
||||
}
|
||||
|
||||
auto& [Name, TypeId] = ConfigToNameLookup.find(Option.first)->second;
|
||||
auto Item = new QStandardItem(QString::fromStdString(Name));
|
||||
@@ -122,7 +126,7 @@ void ConfigModel::setStringList(const QString& Name, const QStringList& Values)
|
||||
const auto& Option = NameToConfigLookup.at(Name.toStdString());
|
||||
LoadedConfig->Erase(Option);
|
||||
for (auto& Value : Values) {
|
||||
LoadedConfig->Set(Option, Value.toStdString().c_str());
|
||||
LoadedConfig->AppendStrArrayValue(Option, Value.toStdString().c_str());
|
||||
}
|
||||
Reload();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user