Merge pull request #9987 from Filoppi/patch-15

Preserve spaces in mapping preview of control names
This commit is contained in:
Léo Lam 2021-08-04 03:29:12 +02:00 committed by GitHub
commit c68bd518c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -50,12 +50,15 @@ static QString RefToDisplayString(ControlReference* ref)
controls[i] = qualifier.has_device ? QStringLiteral(":") : QString();
controls[i].append(QString::fromStdString(qualifier.control_name));
}
else
{
controls[i].remove(QLatin1Char{' '});
}
}
}
// Do not re-add "`" to the final string, we don't need to see it.
expression = controls.join(QStringLiteral(""));
expression.remove(QLatin1Char{' '});
expression.remove(QLatin1Char{'\t'});
expression.remove(QLatin1Char{'\n'});
expression.remove(QLatin1Char{'\r'});