summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2006-10-19 08:44:41 +0000
committerWerner Schweer <ws.seh.de>2006-10-19 08:44:41 +0000
commitbd861b3c0d6bfce561529890b59f888173c3d8f4 (patch)
tree3577624c4fa06b2ee8dc206a91eb270c60d3fa53
parent01387f686182536ebe199df74d75cee7b5cc2c64 (diff)
fix midi channel routing
-rw-r--r--muse/muse/mixer/mstrip.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp
index 50b412c0..7ed22d1f 100644
--- a/muse/muse/mixer/mstrip.cpp
+++ b/muse/muse/mixer/mstrip.cpp
@@ -360,25 +360,21 @@ void MidiChannelStrip::iRoutePressed()
int tn = 0;
for (iMidiTrack i = tl->begin();i != tl->end(); ++i, ++tn) {
MidiTrack* track = *i;
- QAction* id = pup->addAction(track->name());
- id->setCheckable(true);
- QVariant v(track);
- id->setData(v);
- Route dst(*i, -1, Route::TRACK);
+ QAction* action = pup->addAction(track->name());
+ action->setCheckable(true);
+ Route src(track, -1, Route::TRACK);
+ action->setData(QVariant::fromValue(src));
for (iRoute ir = irl->begin(); ir != irl->end(); ++ir) {
- if (*ir == dst) {
- id->setChecked(true);
+ if (*ir == src) {
+ action->setChecked(true);
break;
}
}
}
-
QAction* n = pup->exec(QCursor::pos());
if (n) {
- QString s(n->text());
- MidiTrack* track = n->data().value<MidiTrack*>();
- Route dstRoute(t, -1, Route::TRACK);
- Route srcRoute(track, -1, Route::TRACK);
+ Route srcRoute = n->data().value<Route>();
+ Route dstRoute(track, -1, Route::TRACK);
if (n->isChecked())
audio->msgAddRoute(srcRoute, dstRoute);