mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 14:45:43 +01:00
[Summary] Added "split on playhead" operation.
[Reviewed by] IMaximenko
This commit is contained in:
parent
331a918633
commit
5af3720990
5 changed files with 19 additions and 10 deletions
|
|
@ -1201,6 +1201,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void reset_focus ();
|
||||
|
||||
void split_region ();
|
||||
void split_region_on_playhead ();
|
||||
|
||||
void delete_ ();
|
||||
void cut ();
|
||||
|
|
|
|||
|
|
@ -2054,6 +2054,7 @@ Editor::register_region_actions ()
|
|||
reg_sens (_region_actions, "set-region-sync-position", _("Set Sync Position"), sigc::mem_fun (*this, &Editor::set_region_sync_position));
|
||||
reg_sens (_region_actions, "place-transient", _("Place Transient"), sigc::mem_fun (*this, &Editor::place_transient));
|
||||
reg_sens (_region_actions, "split-region", _("Split"), sigc::mem_fun (*this, &Editor::split_region));
|
||||
reg_sens (_region_actions, "split-on-playhead", _("Split On Playhead"), sigc::mem_fun (*this, &Editor::split_region_on_playhead));
|
||||
reg_sens (_region_actions, "trim-front", _("Trim Start at Edit Point"), sigc::mem_fun (*this, &Editor::trim_region_front));
|
||||
reg_sens (_region_actions, "trim-back", _("Trim End at Edit Point"), sigc::mem_fun (*this, &Editor::trim_region_back));
|
||||
|
||||
|
|
|
|||
|
|
@ -5680,19 +5680,24 @@ Editor::set_playhead_cursor ()
|
|||
void
|
||||
Editor::split_region ()
|
||||
{
|
||||
if ( !selection->time.empty()) {
|
||||
separate_regions_between (selection->time);
|
||||
if (selection->time.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
separate_regions_between (selection->time);
|
||||
}
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_playhead ();
|
||||
framepos_t where = get_playhead_position ();
|
||||
|
||||
if (rs.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
split_regions_at (where, rs);
|
||||
void
|
||||
Editor::split_region_on_playhead ()
|
||||
{
|
||||
RegionSelection regions_to_split = selection->regions;
|
||||
framepos_t where = get_playhead_position ();
|
||||
|
||||
if (regions_to_split.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
split_regions_at (where, regions_to_split);
|
||||
}
|
||||
|
||||
struct EditorOrderRouteSorter {
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ This mode provides many different operations on both regions and control points,
|
|||
@aep|Region/align-regions-start|<@PRIMARY@><@LEVEL4@>a|align start(s)
|
||||
@aep|Region/align-regions-start-relative|<@LEVEL4@>a|align start(s) relative
|
||||
@rop|Region/split-region|s|split
|
||||
@rop|Region/split-on-playhead|<@LEVEL4@>downarrow|split on playhead
|
||||
@sess|Common/Save|<@PRIMARY@>s|save session
|
||||
@sess|Main/Snapshot|<@PRIMARY@><@TERTIARY@>s|snapshot session
|
||||
@trans|Editor/track-solo-toggle|<@SECONDARY@>s|toggle track solo status
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
<menuitem action='editor-cut'/>
|
||||
<menuitem action='editor-delete'/>
|
||||
<menuitem action='split-region'/>
|
||||
<menuitem action='split-on-playhead'/>
|
||||
<menu action="SelectMenu">
|
||||
<menuitem action='deselect-all'/>
|
||||
<menuitem action='invert-selection'/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue