diff options
author | David Robillard <d@drobilla.net> | 2013-01-26 22:08:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-26 22:08:06 +0000 |
commit | 84eee94b1e7fea035f1089d52c75c2d51ed5d5ca (patch) | |
tree | 272c77e1d8c1015a5fd33f5bbab06c043cec5351 /gtk2_ardour | |
parent | 424b291e359bb5a91b00cfabbb577ceb7b4b5ca4 (diff) |
Fix named controls menu to display all controls (don't miss the last submenu).
git-svn-id: svn://localhost/ardour2/branches/3.0@14000 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 2b42d65a73..fc87ed89d0 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -217,7 +217,6 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt) } } - MIDI::Name::MidiPatchManager& patch_manager = MIDI::Name::MidiPatchManager::instance(); MIDI::Name::MasterDeviceNames::Models::const_iterator m = patch_manager.all_models().begin(); @@ -836,10 +835,11 @@ MidiTimeAxisView::build_controller_menu () Menu* ctl_menu = NULL; for (ControlNameList::Controls::const_iterator c = name_list->controls().begin(); - c != name_list->controls().end(); ++c) { + c != name_list->controls().end();) { const uint16_t ctl = c->second->number(); if (ctl == MIDI_CTL_MSB_BANK || ctl == MIDI_CTL_LSB_BANK) { /* Skip bank select controllers since they're handled specially */ + /* FIXME: If this is the last control, the last submenu might be lost */ continue; } @@ -854,7 +854,8 @@ MidiTimeAxisView::build_controller_menu () } else { add_single_channel_controller_item(ctl_items, ctl, c->second->name()); } - + + ++c; if (++n_items == 16 || c == name_list->controls().end()) { /* Submenu has 16 items, add it to controller menu and reset */ items.push_back( @@ -1388,7 +1389,6 @@ MidiTimeAxisView::stop_step_editing () } } - /** @return channel (counted from 0) to add an event to, based on the current setting * of the channel selector. */ |