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
|
bool
|
||||||
Route::set_name (const string& str)
|
Route::set_name (const string& str)
|
||||||
{
|
{
|
||||||
|
if (str.empty ()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (str == name()) {
|
if (str == name()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,8 +294,12 @@ Track::set_name (const string& str)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
if (_record_enable_control->get_value() && _session.actively_recording()) {
|
if (str.empty ()) {
|
||||||
/* this messes things up if done while recording */
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user