Playlist UI tweaks: Update PlaylistSelector (libardour part)
* Add an option to use a playlist without stealing its ownership. (libardour) * Tracks emit PlaylistAdded when a new playlist is created either by copying or by creating a new empty pl
This commit is contained in:
@@ -166,7 +166,7 @@ public:
|
||||
void set_align_style (AlignStyle, bool force=false);
|
||||
void set_align_choice (AlignChoice, bool force=false);
|
||||
void playlist_modified ();
|
||||
int use_playlist (DataType, boost::shared_ptr<Playlist>);
|
||||
int use_playlist (DataType, boost::shared_ptr<Playlist>, bool set_orig = true);
|
||||
int find_and_use_playlist (DataType, PBD::ID const &);
|
||||
int use_copy_playlist ();
|
||||
int use_new_playlist (DataType);
|
||||
@@ -178,6 +178,7 @@ public:
|
||||
|
||||
PBD::Signal0<void> FreezeChange;
|
||||
PBD::Signal0<void> PlaylistChanged;
|
||||
PBD::Signal0<void> PlaylistAdded;
|
||||
PBD::Signal0<void> SpeedChanged;
|
||||
PBD::Signal0<void> AlignmentStyleChanged;
|
||||
PBD::Signal0<void> ChanCountChanged;
|
||||
|
||||
@@ -660,13 +660,15 @@ Track::find_and_use_playlist (DataType dt, PBD::ID const & id)
|
||||
}
|
||||
|
||||
int
|
||||
Track::use_playlist (DataType dt, boost::shared_ptr<Playlist> p)
|
||||
Track::use_playlist (DataType dt, boost::shared_ptr<Playlist> p, bool set_orig)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = _disk_reader->use_playlist (dt, p)) == 0) {
|
||||
if ((ret = _disk_writer->use_playlist (dt, p)) == 0) {
|
||||
p->set_orig_track_id (id());
|
||||
if (set_orig) {
|
||||
p->set_orig_track_id (id());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,7 +718,9 @@ Track::use_copy_playlist ()
|
||||
|
||||
playlist->reset_shares();
|
||||
|
||||
return use_playlist (data_type(), playlist);
|
||||
int rv = use_playlist (data_type(), playlist);
|
||||
PlaylistAdded (); /* EMIT SIGNAL */
|
||||
return rv;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -737,7 +741,9 @@ Track::use_new_playlist (DataType dt)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return use_playlist (dt, playlist);
|
||||
int rv = use_playlist (dt, playlist);
|
||||
PlaylistAdded (); /* EMIT SIGNAL */
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user