View Issue Details

IDProjectCategoryView StatusLast Update
0010415ardourbugspublic2026-06-25 11:31
Reportercolinf Assigned To 
PrioritynormalSeveritytrivialReproducibilityalways
Status newResolutionopen 
Summary0010415: "Prompt for new marker names" doesn't work for new ranges in some cases
DescriptionCreating a new range marker by <ctrl>+drag or right-click in the ruler bar doesn't offer to name the newly-created range immediately: I think it really should.
TagsNo tags attached.

Activities

colinf

2026-06-25 11:31

updater   ~0030547

Simple patch attached
0003-make-name-new-markers-apply-to-new-ranges-too.patch (2,085 bytes)   
From 857bc296cb088d060419b71622a3d29b1962170c Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Fri, 12 Jun 2026 19:07:58 +0100
Subject: [PATCH 03/10] make "name new markers" apply to new ranges too

I'm not sure why RangeMarkerBarDrag::finished() calls
editing_context.begin_reversible_command() when creating new skip & CD
markers, but calls _editor.begin_reversible_command() when creating a new
range marker. Calling _editor.abort_reversible_command() seems to work to
cancel adding a new CD marker if the new marker name dialogue is
cancelled, but it'll need someone who understands this code much better
than me to know if that's really OK.

Fix for #10415
---
 gtk2_ardour/editor_drag.cc    | 5 +++++
 gtk2_ardour/editor_markers.cc | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 3db390c2a0..e1c7969e83 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -6080,6 +6080,11 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
 					_editor.range_bar_drag_rect->hide ();
 				}
 
+				if (!_editor.choose_new_marker_name (rangename, _operation == CreateRangeMarker)) {
+					_editor.abort_reversible_command (); /* ??? _editor. or editing_context. ? */
+					break;
+				}
+
 				newloc = new Location (*editing_context.session (), _editor.temp_location->start (), _editor.temp_location->end (), rangename, flags);
 
 				editing_context.session ()->locations ()->add (newloc, true);
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 2904826ac3..b7ad6218a3 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -880,6 +880,10 @@ Editor::mouse_add_new_range (timepos_t where)
 
 	string name;
 	_session->locations()->next_available_name (name, _("range"));
+
+	if (!choose_new_marker_name (name, true))
+		return;
+
 	Location* loc = new Location (*_session, where, end, name, Location::IsRangeMarker);
 
 	begin_reversible_command (_("new range marker"));
-- 
2.47.3

Issue History

Date Modified Username Field Change
2026-06-24 12:49 colinf New Issue
2026-06-25 11:31 colinf Note Added: 0030547
2026-06-25 11:31 colinf File Added: 0003-make-name-new-markers-apply-to-new-ranges-too.patch