summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/track.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/muse/muse/track.cpp b/muse/muse/track.cpp
index 1cd356cc..b034ab24 100644
--- a/muse/muse/track.cpp
+++ b/muse/muse/track.cpp
@@ -177,7 +177,11 @@ void Track::setDefaultName()
// create unique name
//
for (int i = 1;; ++i) {
- QString s = QString("%1 %2").arg(base).arg(i);
+ QString s;
+ if (i == 1)
+ s = base;
+ else
+ s = QString("%1 %2").arg(base).arg(i);
bool found = false;
TrackList* tl = song->tracks();
for (iTrack it = tl->begin(); it != tl->end(); ++it) {
@@ -196,7 +200,7 @@ void Track::setDefaultName()
}
}
if (!found) {
- setName(i == 1 ? base : s);
+ setName(s);
break;
}
}