mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
prevent duplicate playlist-names when re-naming #7438
This commit is contained in:
parent
bbb5c54c2e
commit
4e1772425d
1 changed files with 7 additions and 2 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include "ardour/profile.h"
|
||||
#include "ardour/playlist.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_playlists.h"
|
||||
#include "ardour/track.h"
|
||||
#include "ardour/types_convert.h"
|
||||
|
||||
|
|
@ -476,8 +477,12 @@ Diskstream::set_name (const string& str)
|
|||
{
|
||||
if (_name != str) {
|
||||
assert(playlist());
|
||||
playlist()->set_name (str);
|
||||
SessionObject::set_name(str);
|
||||
std::string name (str);
|
||||
while (_session.playlists->by_name (name)) {
|
||||
name = Playlist::bump_name (name, _session);
|
||||
}
|
||||
playlist()->set_name (name);
|
||||
SessionObject::set_name(name);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue