add "Select Range" to range marker context menu
git-svn-id: svn://localhost/ardour2/trunk@1589 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
29f6f0cf05
commit
c309e2a323
@ -1239,6 +1239,7 @@ class Editor : public PublicEditor
|
||||
void marker_menu_hide ();
|
||||
void marker_menu_loop_range ();
|
||||
void marker_menu_select_all_selectables_using_range ();
|
||||
void marker_menu_select_using_range ();
|
||||
void marker_menu_separate_regions_using_location ();
|
||||
void marker_menu_play_from ();
|
||||
void marker_menu_play_range ();
|
||||
|
@ -510,6 +510,7 @@ Editor::build_range_marker_menu (bool loop_or_punch)
|
||||
|
||||
items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
|
||||
items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
|
||||
items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
|
||||
|
||||
}
|
||||
|
||||
@ -559,6 +560,24 @@ Editor::marker_menu_hide ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_menu_select_using_range ()
|
||||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
Location* l;
|
||||
bool is_start;
|
||||
|
||||
if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
|
||||
set_selection_from_range (*l);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_menu_select_all_selectables_using_range ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user