Commit f51cc8ff authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Only prefix SensorProperty when it's not empty

Otherwise we end up with all sensor names being prefix with a space.
parent b027861a
......@@ -68,7 +68,7 @@ void SensorProperty::setName(const QString &name)
}
m_name = name;
m_info.name = m_prefix % QLatin1Char(' ') % m_name;
m_info.name = m_prefix.isEmpty() ? m_name : m_prefix % QLatin1Char(' ') % m_name;
emit sensorInfoChanged();
}
......@@ -89,7 +89,7 @@ void SensorProperty::setPrefix(const QString &prefix)
}
m_prefix = prefix;
m_info.name = prefix % QLatin1Char(' ') % m_name;
m_info.name = prefix.isEmpty() ? m_name : prefix % QLatin1Char(' ') % m_name;
emit sensorInfoChanged();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment