Layer Display: add explicit actions for stacked+overlaid

This commit is contained in:
Ben Loftis 2021-06-27 21:38:29 -05:00 committed by Robin Gareus
parent d4392b4a1b
commit 73b0a3fdb9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 21 additions and 0 deletions

View File

@ -1536,7 +1536,10 @@ private:
bool select_new_marker;
void toggle_all_existing_automation ();
void toggle_layer_display ();
void layer_display_stacked ();
void layer_display_overlaid ();
void launch_playlist_selector ();

View File

@ -175,6 +175,7 @@ Editor::register_actions ()
ActionManager::register_action (editor_menu_actions, X_("SyncMenu"), _("Sync"));
ActionManager::register_action (editor_menu_actions, X_("TempoMenu"), _("Tempo"));
ActionManager::register_action (editor_menu_actions, X_("Timecode"), _("Timecode fps"));
ActionManager::register_action (editor_menu_actions, X_("LayerDisplay"), _("Region Layers"));
act = ActionManager::register_action (editor_menu_actions, X_("TrackHeightMenu"), _("Height"));
ActionManager::stripable_selection_sensitive_actions.push_back (act);
@ -262,6 +263,9 @@ Editor::register_actions ()
reg_sens (editor_actions, "toggle-all-existing-automation", _("Toggle All Existing Automation"), sigc::mem_fun (*this, &Editor::toggle_all_existing_automation));
reg_sens (editor_actions, "toggle-layer-display", _("Toggle Layer Display"), sigc::mem_fun (*this, &Editor::toggle_layer_display));
reg_sens (editor_actions, "layer-display-stacked", _("Stacked layer display"), sigc::mem_fun (*this, &Editor::layer_display_stacked));
reg_sens (editor_actions, "layer-display-overlaid", _("Overlaid layer display"), sigc::mem_fun (*this, &Editor::layer_display_overlaid));
act = reg_sens (editor_actions, "show-plist-selector", _("Show Playlist Selector"), sigc::mem_fun (*this, &Editor::launch_playlist_selector));
ActionManager::stripable_selection_sensitive_actions.push_back (act);

View File

@ -8669,6 +8669,20 @@ Editor::toggle_layer_display ()
}
void
Editor::layer_display_overlaid ()
{
TrackViewList & tvl (selection->tracks.empty() ? track_views : selection->tracks);
tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, Overlaid));
}
void
Editor::layer_display_stacked ()
{
TrackViewList & tvl (selection->tracks.empty() ? track_views : selection->tracks);
tvl.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, Stacked));
}
void
Editor::launch_playlist_selector ()
{