From 5343d00382d67dab6ee5cd28eb5507ec76b0194c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 9 May 2021 17:52:22 -0600 Subject: [PATCH] when adding locations with empty names, generate one (related to 1c753a7f38) --- libs/ardour/location.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 7dd5860401..636f7d9154 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1057,6 +1057,18 @@ Locations::add (Location *loc, bool make_current) added (loc); /* EMIT SIGNAL */ + if (loc->name().empty()) { + string new_name; + + if (loc->is_mark()) { + next_available_name (new_name, _("mark")); + } else { + next_available_name (new_name, _("range")); + } + + loc->set_name (new_name); + } + if (make_current) { current_changed (current_location); /* EMIT SIGNAL */ }