Select newly created playlists

This commit is contained in:
David Sansome 2010-05-21 09:41:57 +00:00
parent 0aa579c2be
commit a274f8cbfc
2 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,10 @@ void PlaylistContainer::SetViewModel(Playlist* playlist) {
view()->SetItemDelegates(manager_->library_backend());
playlist->IgnoreSorting(false);
// Ensure that tab is current
if (ui_->tab_bar->currentIndex() != manager_->current_index())
ui_->tab_bar->setCurrentIndex(manager_->current_index());
// Sort out the undo/redo actions
delete undo_;
delete redo_;

View File

@ -74,6 +74,7 @@ void PlaylistManager::New(const QString& name) {
qFatal("Couldn't create playlist");
AddPlaylist(id, name);
SetCurrentPlaylist(playlists_.count() - 1);
}
void PlaylistManager::Load(const QString& filename) {