summaryrefslogtreecommitdiff
path: root/libs/ardour/track.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-01 15:19:30 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-01 15:19:30 +0000
commit6930071cdbccf78f3871027991355a3fc524ba4b (patch)
tree64aee3d25986bcba825f960c3373e0bc046a9cb3 /libs/ardour/track.cc
parent50aeca5fa5ff317f18fc7963d65f65dca5bad89f (diff)
When we rename a track, only rename its playlist if it
has never contained any regions (#4759). git-svn-id: svn://localhost/ardour2/branches/3.0@12525 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/track.cc')
-rw-r--r--libs/ardour/track.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 9699558ff1..0ad59d1b31 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -329,7 +329,15 @@ Track::set_name (const string& str)
return false;
}
- _diskstream->set_name (str);
+ if (_diskstream->playlist()->all_regions_empty ()) {
+ /* Only rename the diskstream (and therefore the playlist) if
+ the playlist has never had a region added to it. Otherwise
+ people can get confused if, say, they have notes about a
+ playlist with a given name and then it changes (see mantis
+ #4759).
+ */
+ _diskstream->set_name (str);
+ }
/* save state so that the statefile fully reflects any filename changes */