Store correct string markers when picking from a scriptlog in the profile editor (closes #3620)

This commit is contained in:
Alexander Bock
2025-07-02 17:43:49 +02:00
parent a523a6619b
commit f1313b7424
@@ -409,10 +409,22 @@ void PropertiesDialog::selectLineFromScriptLog() {
}
// Remove the string markers around the property
const QString property = textList[0].mid(1, textList[0].size() - 2);
const QString value = textList[1];
const QString prop = textList[0].mid(1, textList[0].size() - 2).trimmed();
_propertyEdit->setText(property.trimmed());
QString value = textList[1].trimmed();
// If they exist, we need to replace the single string markers around the
// property, with double string markers
if (value.size() > 2) {
if (value[0] == '\'') {
value[0] = '"';
}
const QChar end = value[value.size() - 1];
if (value[value.size() - 1] == '\'') {
value[value.size() - 1] = '"';
}
}
_propertyEdit->setText(prop);
_valueEdit->setText(value.trimmed());
listItemSave();
}