From 1973243a988be0717948f0fb2075bce4fe11e27b Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Fri, 6 Feb 2015 23:56:34 +0000 Subject: Separate out creation of xrun markers from Editor::mouse_add_new_marker() Remove the is_xrun parameter from Editor::mouse_add_new_marker(), and just create the marker directly in ARDOUR_UI::create_xrun_marker(), so that xrun markers don't become automatically selected when they appear. --- gtk2_ardour/editor_markers.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'gtk2_ardour/editor_markers.cc') diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index d982de3a32..17315d702f 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -636,21 +636,14 @@ Editor::LocationMarkers::setup_lines () } void -Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun) +Editor::mouse_add_new_marker (framepos_t where, bool is_cd) { - string markername, markerprefix; + string markername; int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark); - if (is_xrun) { - markerprefix = "xrun"; - flags = Location::IsMark; - } else { - markerprefix = "mark"; - } - if (_session) { - _session->locations()->next_available_name(markername, markerprefix); - if (!is_xrun && !choose_new_marker_name(markername)) { + _session->locations()->next_available_name(markername, _("mark")); + if (!choose_new_marker_name(markername)) { return; } Location *location = new Location (*_session, where, where, markername, (Location::Flags) flags); -- cgit v1.2.3