Expose Cut/Copy Section in Edit Menu

Also remove it from the context menu, since it fails
with edit-point = Mouse.
This commit is contained in:
Robin Gareus 2023-05-18 03:45:14 +02:00
parent 86393ecfc3
commit 3ef5b0881f
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 7 additions and 15 deletions

View file

@ -1966,10 +1966,6 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
edit_items.push_back (MenuElem (_("Crop Region to Range"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)));
edit_items.push_back (MenuElem (_("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false)));
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Copy/Paste Range Section to Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::cut_copy_section), true)));
edit_items.push_back (MenuElem (_("Cut/Paste Range Section to Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::cut_copy_section), false)));
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Consolidate"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), ReplaceRange, false)));
edit_items.push_back (MenuElem (_("Consolidate (with processing)"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), ReplaceRange, true)));
@ -2052,17 +2048,6 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
}
edit_items.push_back (MenuElem (_("Insert Existing Media"), sigc::bind (sigc::mem_fun(*this, &Editor::add_external_audio_action), ImportToTrack)));
/* Cut/Copy Section */
timepos_t unused;
bool have_time_selection = get_selection_extents (unused, unused);
edit_items.push_back (SeparatorElem());
edit_items.push_back (MenuElem (_("Copy/Paste Range Section to Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::cut_copy_section), true)));
edit_items.back ().set_sensitive (have_time_selection);
edit_items.push_back (MenuElem (_("Cut/Paste Range Section to Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::cut_copy_section), false)));
edit_items.back ().set_sensitive (have_time_selection);
/* Nudge track */
Menu *nudge_menu = manage (new Menu());