diff --git a/gtk2_ardour/trigger.bindings b/gtk2_ardour/trigger.bindings index e9163aa916..8829964ea9 100644 --- a/gtk2_ardour/trigger.bindings +++ b/gtk2_ardour/trigger.bindings @@ -8,5 +8,7 @@ + + diff --git a/gtk2_ardour/trigger_page.cc b/gtk2_ardour/trigger_page.cc index 677980bc74..dee13cd6d2 100644 --- a/gtk2_ardour/trigger_page.cc +++ b/gtk2_ardour/trigger_page.cc @@ -364,6 +364,18 @@ TriggerPage::initial_track_display () add_routes (rl); } +void +TriggerPage::clear_selected_slot () +{ + Selection& selection (Editor::instance ().get_selection ()); + TriggerSelection ts = selection.triggers; + if (ts.empty ()) { + return; + } + TriggerPtr trigger = ts.front ()->trigger (); + trigger->set_region (boost::shared_ptr()); +} + void TriggerPage::selection_changed () { @@ -758,6 +770,8 @@ TriggerPage::register_actions () { Glib::RefPtr trigger_actions = ActionManager::create_action_group (bindings, X_("Cues")); + ActionManager::register_action (trigger_actions, "clear-trigger-slot", _("Clear Selected Slot"), sigc::mem_fun (*this, &TriggerPage::clear_selected_slot)); + for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { const std::string action_name = string_compose ("trigger-cue-%1", n); const std::string display_name = string_compose (_("Trigger Cue %1"), cue_marker_name (n)); diff --git a/gtk2_ardour/trigger_page.h b/gtk2_ardour/trigger_page.h index eedc9439f9..bac521e209 100644 --- a/gtk2_ardour/trigger_page.h +++ b/gtk2_ardour/trigger_page.h @@ -74,6 +74,8 @@ private: void add_routes (ARDOUR::RouteList&); void remove_route (TriggerStrip*); + void clear_selected_slot (); + void redisplay_track_list (); void pi_property_changed (PBD::PropertyChange const&); void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr);