mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 14:29:42 -05:00
Store correct string markers when picking from a scriptlog in the profile editor (closes #3620)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user