summaryrefslogtreecommitdiff
path: root/muse2/muse/helper.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-28 12:08:21 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-28 12:08:21 +0000
commit55a6fa75d70dbcd38e4b434420c970475448d1a7 (patch)
tree9f3d7c7f8c81c59e7c91ee9fa4cb904ad900ce52 /muse2/muse/helper.cpp
parentc05ce86388943e66db1aa39ace54f040000e49ac (diff)
fixed buggy bugfix in score editor
Diffstat (limited to 'muse2/muse/helper.cpp')
-rw-r--r--muse2/muse/helper.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/muse2/muse/helper.cpp b/muse2/muse/helper.cpp
index d4a237ea..be45e048 100644
--- a/muse2/muse/helper.cpp
+++ b/muse2/muse/helper.cpp
@@ -43,12 +43,7 @@ QString pitch2string(int v)
-int partToIndex(Part* p)
-{
- return p->track()->parts()->index(p);
-}
-
-Part* partFromIndex(int index)
+Part* partFromSerialNumber(int serial)
{
TrackList* tl = song->tracks();
for (iTrack it = tl->begin(); it != tl->end(); ++it)
@@ -56,10 +51,10 @@ Part* partFromIndex(int index)
PartList* pl = (*it)->parts();
iPart ip;
for (ip = pl->begin(); ip != pl->end(); ++ip)
- if (ip->second->sn() == index)
+ if (ip->second->sn() == serial)
return ip->second;
}
- printf("ERROR: partFromIndex(%i) wasn't able to find an appropriate part!\n",index);
+ printf("ERROR: partFromSerialNumber(%i) wasn't able to find an appropriate part!\n",serial);
return NULL;
}