From 3a7eeb17bc90b40b3916fbf7ba8b452b1b6085b0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Jan 2013 21:47:10 +0000 Subject: [PATCH] add/clarify "set range (location) from (range|region) selection" operation (on marker context menu git-svn-id: svn://localhost/ardour2/branches/3.0@13825 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor.h | 2 +- gtk2_ardour/editor_markers.cc | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index a55fef1913..e95be847cd 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1521,7 +1521,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void marker_menu_play_range (); void marker_menu_set_playhead (); void marker_menu_set_from_playhead (); - void marker_menu_set_from_selection (); + void marker_menu_set_from_selection (bool force_regions); void marker_menu_range_to_next (); void marker_menu_zoom_to_range (); void new_transport_marker_menu_set_loop (); diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 1eae5d7b38..a6e7fadb0b 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -901,7 +901,8 @@ Editor::build_range_marker_menu (bool loop_or_punch, bool session) } items.push_back (MenuElem (_("Set Range Mark from Playhead"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_playhead))); if (!Profile->get_sae()) { - items.push_back (MenuElem (_("Set Range from Range Selection"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_selection))); + items.push_back (MenuElem (_("Set Range from Range/Region Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::marker_menu_set_from_selection), false))); + items.push_back (MenuElem (_("Set Range from Region Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::marker_menu_set_from_selection), true))); } items.push_back (MenuElem (_("Zoom to Range"), sigc::mem_fun (*this, &Editor::marker_menu_zoom_to_range))); @@ -1154,7 +1155,7 @@ Editor::marker_menu_set_from_playhead () } void -Editor::marker_menu_set_from_selection () +Editor::marker_menu_set_from_selection (bool force_regions) { Marker* marker; @@ -1175,7 +1176,7 @@ Editor::marker_menu_set_from_selection () /* if range selection use first to last */ - if (!selection->time.empty()) { + if (!selection->time.empty() && !force_regions) { l->set_start (selection->time.start()); l->set_end (selection->time.end_frame()); }