Ignore empty script paths
This commit is contained in:
parent
885695e705
commit
7411ddaeef
1 changed files with 5 additions and 2 deletions
|
@ -214,9 +214,12 @@ void CustomScriptsEditor::save() {
|
||||||
QList<bool> enabledStates;
|
QList<bool> enabledStates;
|
||||||
for (int i = 0; i < ui->list->count(); i++) {
|
for (int i = 0; i < ui->list->count(); i++) {
|
||||||
auto item = ui->list->item(i);
|
auto item = ui->list->item(i);
|
||||||
paths.append(this->getScriptFilepath(item, false));
|
const QString path = this->getScriptFilepath(item, false);
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
paths.append(path);
|
||||||
enabledStates.append(this->getScriptEnabled(item));
|
enabledStates.append(this->getScriptEnabled(item));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
userConfig.setCustomScripts(paths, enabledStates);
|
userConfig.setCustomScripts(paths, enabledStates);
|
||||||
this->hasUnsavedChanges = false;
|
this->hasUnsavedChanges = false;
|
||||||
|
|
Loading…
Reference in a new issue