summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 3245b79c59..06e99d0fbb 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -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)));
}
@@ -560,6 +561,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 ()
{
Marker* marker;