summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-09 21:47:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-09 21:47:10 +0000
commit3a7eeb17bc90b40b3916fbf7ba8b452b1b6085b0 (patch)
treee8f614d59e6b963a4569f6623d688597d6978564 /gtk2_ardour/editor_markers.cc
parentec7f4dc217e9c503e53cbf9daae3278de3ee1641 (diff)
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
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc7
1 files changed, 4 insertions, 3 deletions
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());
}