X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_time_axis.cc;h=b1068e7e3f5ea2353c40b1c27d462c9907da0502;hb=965a9740835a77cc2bf9e6cea237e56ae41150d8;hp=23d4adb104d371724f30bf5b3b2cd65ba81ac5a1;hpb=27cbe72d969e16a16dd60c4d86c018a2d2cec78f;p=ardour.git diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 23d4adb104..b1068e7e3f 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -244,6 +244,22 @@ MidiTimeAxisView::~MidiTimeAxisView () delete _step_editor; } +void +MidiTimeAxisView::enter_internal_edit_mode () +{ + if (midi_view()) { + midi_view()->enter_internal_edit_mode (); + } +} + +void +MidiTimeAxisView::leave_internal_edit_mode () +{ + if (midi_view()) { + midi_view()->leave_internal_edit_mode (); + } +} + void MidiTimeAxisView::check_step_edit () { @@ -349,6 +365,8 @@ MidiTimeAxisView::append_extra_display_menu_items () items.push_back (CheckMenuElem (_("MIDI Thru"), sigc::mem_fun(*this, &MidiTimeAxisView::toggle_midi_thru))); _midi_thru_item = dynamic_cast(&items.back()); + + items.push_back (SeparatorElem ()); } Gtk::Menu* @@ -442,6 +460,7 @@ MidiTimeAxisView::build_automation_action_menu () automation_items.push_back (MenuElem (_("Controllers"), *controller_menu)); } else { automation_items.push_back (MenuElem (string_compose ("%1", _("No MIDI Channels selected")))); + dynamic_cast (automation_items.back().get_child())->set_use_markup (true); } } @@ -664,9 +683,14 @@ MidiTimeAxisView::build_controller_menu () if (selected_channels & (0x0001 << chn)) { Evoral::Parameter fully_qualified_param (MidiCCAutomation, chn, ctl); - ctl_items.push_back (CheckMenuElem (_route->describe_parameter (fully_qualified_param), - sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::toggle_automation_track), - fully_qualified_param))); + ctl_items.push_back ( + CheckMenuElem ( + string_compose ("%1: %2 [%3]", ctl, midi_name (ctl), int (chn)), + sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::toggle_automation_track), + fully_qualified_param) + ) + ); + dynamic_cast (ctl_items.back().get_child())->set_use_markup (true); boost::shared_ptr track = automation_child (fully_qualified_param); bool visible = false; @@ -842,16 +866,24 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool /* These controllers are region "automation", so we do not create * an AutomationList/Line for the track */ - boost::shared_ptr c = _route->get_control (param); - assert (c); - - boost::shared_ptr track(new AutomationTimeAxisView (_session, - _route, boost::shared_ptr(), c, - _editor, - *this, - true, - parent_canvas, - _route->describe_parameter(param))); + boost::shared_ptr track ( + new AutomationTimeAxisView ( + _session, + _route, + boost::shared_ptr (), + boost::shared_ptr (), + param, + _editor, + *this, + true, + parent_canvas, + _route->describe_parameter(param) + ) + ); + + if (_view) { + _view->foreach_regionview (sigc::mem_fun (*track.get(), &TimeAxisView::add_ghost)); + } add_automation_child (param, track, show); } @@ -994,7 +1026,7 @@ MidiTimeAxisView::set_channel_mode (ChannelMode, uint16_t) /* TODO: Bender, Pressure */ - /* invalidate the controller menu, so that we rebuilt it next time */ + /* invalidate the controller menu, so that we rebuild it next time */ _controller_menu_map.clear (); delete controller_menu; controller_menu = 0;