Add track/bus rename safeguards to the backend (handy for scripting)
This commit is contained in:
parent
837ad93e7c
commit
333e3c6019
|
@ -4017,6 +4017,10 @@ Route::save_as_template (const string& path, const string& name)
|
|||
bool
|
||||
Route::set_name (const string& str)
|
||||
{
|
||||
if (str.empty ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (str == name()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -294,8 +294,12 @@ Track::set_name (const string& str)
|
|||
{
|
||||
bool ret;
|
||||
|
||||
if (_record_enable_control->get_value() && _session.actively_recording()) {
|
||||
/* this messes things up if done while recording */
|
||||
if (str.empty ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_record_enable_control->get_value()) {
|
||||
/* when re-arm'ed the file (named after the track) is already ready to rolll */
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user