Ref T384, strip added name before adding a changed one

This commit is contained in:
Klaus Basan
2018-10-02 20:00:55 +02:00
parent ed80bc90a8
commit e4dfa01c2e
2 changed files with 4 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ namespace BlackMisc
void CIdentifier::appendName(const QString &name)
{
if (m_name.endsWith(name)) { return; }
if (name.isEmpty()) { return; }
const int index = m_name.lastIndexOf(':');
if (index >= 0) { m_name = m_name.left(index); }
m_name += QStringLiteral(":") + name;
}