From 945a0a27875e0dba1a3bc9a32defade1c4ff6f72 Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Thu, 2 Nov 2006 17:37:56 +0000 Subject: updates --- muse/muse/track.cpp | 8 ++++++-- 1 file 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; } } -- cgit v1.2.3