Gui: Prevent camel case splitting on numbers/symbols in Property Editor

This commit is contained in:
Dhruv Singh Jamwal
2026-02-27 11:30:21 -06:00
committed by Chris Hennes
parent 2fda119f74
commit 7be33f496e
+4 -8
View File
@@ -574,18 +574,14 @@ void PropertyItem::setPropertyName(const QString& name, const QString& realName)
setObjectName(propName);
QString display;
bool upper = false;
// Prevent camel case splitting on numbers in Property Editor
for (auto&& i : name) {
if (i.isUpper() && !display.isEmpty()) {
// if there is a sequence of capital letters do not insert spaces
if (!upper) {
QChar last = display.at(display.length() - 1);
if (!last.isSpace()) {
display += QLatin1String(" ");
}
QChar last = display.at(display.length() - 1);
if (last.isLower()) {
display += QLatin1String(" ");
}
}
upper = i.isUpper();
display += i;
}