mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
mo' better fixes for managing MIDI CC/automation lanes
git-svn-id: svn://localhost/ardour2/branches/3.0@6473 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
935eba7979
commit
dbff8105ab
3 changed files with 65 additions and 22 deletions
|
|
@ -1060,7 +1060,45 @@ MidiTimeAxisView::toggle_note_selection_region_view (RegionView* rv, uint8_t not
|
|||
void
|
||||
MidiTimeAxisView::set_channel_mode (ChannelMode, uint16_t)
|
||||
{
|
||||
/* hide all automation tracks that use the wrong channel(s) and show all those that use
|
||||
the right ones.
|
||||
*/
|
||||
|
||||
uint16_t selected_channels = _channel_selector.get_selected_channels();
|
||||
bool changed = false;
|
||||
|
||||
no_redraw = true;
|
||||
|
||||
for (uint32_t ctl = 0; ctl < 127; ++ctl) {
|
||||
|
||||
for (uint32_t chn = 0; chn < 16; ++chn) {
|
||||
Evoral::Parameter fully_qualified_param (MidiCCAutomation, chn, ctl);
|
||||
RouteAutomationNode* node = automation_track (fully_qualified_param);
|
||||
|
||||
if (!node) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((selected_channels & (0x0001 << chn)) == 0) {
|
||||
/* channel not in use. hiding it will trigger RouteTimeAxisView::automation_track_hidden()
|
||||
which will cause a redraw. We don't want one per channel, so block that with no_redraw.
|
||||
*/
|
||||
changed = node->track->set_visibility (false) || changed;
|
||||
} else {
|
||||
changed = node->track->set_visibility (true) || changed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
no_redraw = false;
|
||||
|
||||
/* TODO: Bender, PgmChange, Pressure */
|
||||
|
||||
/* invalidate the controller menu, so that we rebuilt it next time */
|
||||
delete controller_menu;
|
||||
controller_menu = 0;
|
||||
|
||||
if (changed) {
|
||||
_route->gui_changed ("track_height", this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue