From 0bda9316471dd2c96aee754a352fb32fba77edeb Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Tue, 12 Apr 2011 04:47:39 +0000 Subject: Fixed regression with midi oR button. Also don't list synths. --- muse2/muse/app.cpp | 70 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 31 deletions(-) (limited to 'muse2/muse/app.cpp') 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 { -- cgit v1.2.3