diff options
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-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. */ |