when adding locations with empty names, generate one (related to 1c753a7f38)

This commit is contained in:
Paul Davis
2021-05-09 17:52:22 -06:00
parent c45be2266e
commit 5343d00382

View File

@@ -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 */
}