Commit f0ce6917 authored by Alexander Semke's avatar Alexander Semke
Browse files

When determining the unique name for the newly added aspect, ignore the

digit characters in the names of other children names that are part of
the original name. Look for the combination of space+digit that is added
to the names to ensure the uniquness.
parent b1d9ea19
......@@ -831,7 +831,8 @@ QString AbstractAspect::uniqueNameFor(const QString& current_name) const {
QString base = current_name;
int last_non_digit;
for (last_non_digit = base.size() - 1; last_non_digit >= 0 &&
base[last_non_digit].category() == QChar::Number_DecimalDigit; --last_non_digit)
base[last_non_digit].category() == QChar::Number_DecimalDigit && base[last_non_digit-1].category() == QChar::Separator_Space;
--last_non_digit)
base.chop(1);
if (last_non_digit >=0 && base[last_non_digit].category() != QChar::Separator_Space)
......
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