diff options
author | Werner Schweer <ws.seh.de> | 2006-11-02 17:37:56 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2006-11-02 17:37:56 +0000 |
commit | 945a0a27875e0dba1a3bc9a32defade1c4ff6f72 (patch) | |
tree | 815df6f90c6c67b81e06c73a8b2165564b6c9d42 | |
parent | ee617e87df9322768f4f3c456d8470ec67ab16ea (diff) |
updates
-rw-r--r-- | muse/muse/track.cpp | 8 |
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; } } |