diff options
author | Tim E. Real <termtech@rogers.com> | 2011-04-12 04:47:39 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-04-12 04:47:39 +0000 |
commit | 0bda9316471dd2c96aee754a352fb32fba77edeb (patch) | |
tree | 884d0aea65ee8523541c8f1b2a0c8ea8aba5bf0a /muse2/muse | |
parent | c8a651f88b5728e246cb46599521ce981f0f4cfb (diff) |
Fixed regression with midi oR button. Also don't list synths.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/app.cpp | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 21a4f05f..8143bb0c 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -2431,7 +2431,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; @@ -2829,43 +2829,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 { |