summaryrefslogtreecommitdiff
path: root/muse2/muse/app.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-04-15 17:25:25 +0000
committerFlorian Jung <flo@windfisch.org>2011-04-15 17:25:25 +0000
commit8edb9ca0e8e056faa0b488c947e7447a8148f880 (patch)
treeded8262f2ee8abcfe24e7ace97ad4b76dc0a9edc /muse2/muse/app.cpp
parentd7e222752028fd0bed037c06806d252a66c5db88 (diff)
parent15ceeacaf980aff12311a25293e2c4772087af04 (diff)
merged with current trunk
Diffstat (limited to 'muse2/muse/app.cpp')
-rw-r--r--muse2/muse/app.cpp70
1 files changed, 39 insertions, 31 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index a96b7e9b..9f10a614 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -2459,7 +2459,7 @@ void MusE::routingPopupMenuActivated(Track* track, int n)
if(n == -1)
return;
- if(n == 0) // p4.0.17
+ if(!gIsOutRoutingPopupMenu && n == 0) // p4.0.17
{
muse->configMidiPorts();
return;
@@ -2857,43 +2857,51 @@ PopupMenu* MusE::prepareRoutingPopupMenu(Track* track, bool dst)
if(port >= 0 && port < MIDI_PORTS)
{
MidiPort* mp = &midiPorts[port];
- RouteList* mprl = mp->outRoutes();
- int chbits = 1 << ((MidiTrack*)track)->outChannel();
- //MidiDevice* md = mp->device();
- //if(!md)
- // continue;
-
- pup->addSeparator();
- pup->addAction(new MenuTitleItem(tr("Soloing chain"), pup));
- PopupMenu* subp = new PopupMenu(pup);
- subp->setTitle(tr("Audio returns"));
- pup->addMenu(subp);
- InputList* al = song->inputs();
- for (iAudioInput i = al->begin(); i != al->end(); ++i)
+ // p4.0.17 Do not list synth devices! Requiring valid device is desirable,
+ // but could lead to 'hidden' routes unless we add more support
+ // such as removing the existing routes when user changes flags.
+ // So for now, just list all valid ports whether read or write.
+ if(mp->device() && !mp->device()->isSynti())
{
- Track* t = *i;
- QString s(t->name());
+ RouteList* mprl = mp->outRoutes();
+ int chbits = 1 << ((MidiTrack*)track)->outChannel();
+ //MidiDevice* md = mp->device();
+ //if(!md)
+ // continue;
- act = subp->addAction(s);
- act->setData(gid);
- act->setCheckable(true);
-
- Route r(t, chbits);
+ pup->addSeparator();
+ pup->addAction(new MenuTitleItem(tr("Soloing chain"), pup));
+ PopupMenu* subp = new PopupMenu(pup);
+ subp->setTitle(tr("Audio returns"));
+ pup->addMenu(subp);
- gRoutingMenuMap.insert( pRouteMenuMap(gid, r) );
-
- for(iRoute ir = mprl->begin(); ir != mprl->end(); ++ir)
+ InputList* al = song->inputs();
+ for (iAudioInput i = al->begin(); i != al->end(); ++i)
{
- if(ir->type == Route::TRACK_ROUTE && ir->track == t && (ir->channel & chbits))
+ Track* t = *i;
+ QString s(t->name());
+
+ act = subp->addAction(s);
+ act->setData(gid);
+ act->setCheckable(true);
+
+ Route r(t, chbits);
+
+ gRoutingMenuMap.insert( pRouteMenuMap(gid, r) );
+
+ for(iRoute ir = mprl->begin(); ir != mprl->end(); ++ir)
{
- act->setChecked(true);
- break;
- }
+ if(ir->type == Route::TRACK_ROUTE && ir->track == t && (ir->channel & chbits))
+ {
+ act->setChecked(true);
+ break;
+ }
+ }
+ ++gid;
}
- ++gid;
- }
- }
+ }
+ }
}
else
{