summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-13 18:44:37 +0100
committerRobin Gareus <robin@gareus.org>2017-03-13 18:44:37 +0100
commit333e3c60193b1f5832a9bffb94da6fbb4c7c1085 (patch)
tree0920135cd774bbf0c98612afa88354c5aa9a74bd /libs/ardour
parent837ad93e7c2d12db6e184b5db76a6302a421067f (diff)
Add track/bus rename safeguards to the backend (handy for scripting)
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/route.cc4
-rw-r--r--libs/ardour/track.cc8
2 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 44d7958740..81c5284583 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -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;
}
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index c84d9a1868..0fcf831f46 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -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;
}