don't alter session search path frm within FileSource constructor, do it when a source is added to the session; related - don't add sources that are created with announce=false to the session, and as a (new) corollary, no longer cause them to potentially alter the session search path (this applies mostly to sources created for auditioning)

git-svn-id: svn://localhost/ardour2/branches/3.0@12456 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-27 18:07:30 +00:00
parent 341d033b2c
commit 06c7a5da6b
2 changed files with 9 additions and 5 deletions

View File

@ -122,11 +122,7 @@ FileSource::init (const string& pathstr, bool must_exist)
}
set_within_session_from_path (_path);
if (!within_session()) {
_session.ensure_search_path_includes (Glib::path_get_dirname (_path), _type);
}
_name = Glib::path_get_basename (_path);
if (_file_is_new && must_exist) {

View File

@ -2952,6 +2952,14 @@ Session::add_source (boost::shared_ptr<Source> source)
/* yay, new source */
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (source);
if (fs) {
if (!fs->within_session()) {
ensure_search_path_includes (Glib::path_get_dirname (fs->path()), fs->type());
}
}
set_dirty();
boost::shared_ptr<AudioFileSource> afs;