summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-10 14:07:46 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-10 14:07:46 +0000
commit31172d0c71d56db3e0ae7dac3ea21e731e80cedf (patch)
treef98bdeb7fcc31bda9a228a471377623d0660c771
parent3a7eeb17bc90b40b3916fbf7ba8b452b1b6085b0 (diff)
tweak recent change to marker context menu
git-svn-id: svn://localhost/ardour2/branches/3.0@13826 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor_markers.cc36
1 files changed, 14 insertions, 22 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index a6e7fadb0b..070ce4bc6e 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -894,15 +894,13 @@ Editor::build_range_marker_menu (bool loop_or_punch, bool session)
markerMenu->set_name ("ArdourContextMenu");
items.push_back (MenuElem (_("Play Range"), sigc::mem_fun(*this, &Editor::marker_menu_play_range)));
- items.push_back (MenuElem (_("Locate to Range Mark"), sigc::mem_fun(*this, &Editor::marker_menu_set_playhead)));
- items.push_back (MenuElem (_("Play from Range Mark"), sigc::mem_fun(*this, &Editor::marker_menu_play_from)));
- if (!loop_or_punch_or_session) {
- items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
- }
- items.push_back (MenuElem (_("Set Range Mark from Playhead"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
+ items.push_back (MenuElem (_("Locate to Marker"), sigc::mem_fun(*this, &Editor::marker_menu_set_playhead)));
+ items.push_back (MenuElem (_("Play from Marker"), sigc::mem_fun(*this, &Editor::marker_menu_play_from)));
+ items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
+
+ items.push_back (MenuElem (_("Set Marker from Playhead"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
if (!Profile->get_sae()) {
- 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 (_("Set Range from Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::marker_menu_set_from_selection), false)));
}
items.push_back (MenuElem (_("Zoom to Range"), sigc::mem_fun (*this, &Editor::marker_menu_zoom_to_range)));
@@ -1155,7 +1153,7 @@ Editor::marker_menu_set_from_playhead ()
}
void
-Editor::marker_menu_set_from_selection (bool force_regions)
+Editor::marker_menu_set_from_selection (bool /*force_regions*/)
{
Marker* marker;
@@ -1170,21 +1168,15 @@ Editor::marker_menu_set_from_selection (bool force_regions)
if ((l = find_location_from_marker (marker, is_start)) != 0) {
if (l->is_mark()) {
- // nothing for now
- }
- else {
- /* if range selection use first to last */
+ // nothing for now
- if (!selection->time.empty() && !force_regions) {
- l->set_start (selection->time.start());
- l->set_end (selection->time.end_frame());
- }
- else {
- if (!selection->regions.empty()) {
- l->set_start (selection->regions.start());
- l->set_end (selection->regions.end_frame());
- }
+ } else {
+
+ if (!selection->time.empty()) {
+ l->set (selection->time.start(), selection->time.end_frame());
+ } else if (!selection->regions.empty()) {
+ l->set (selection->regions.start(), selection->regions.end_frame());
}
}
}