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 */ - - 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()); } } }