diff --git a/src/apps/mediaplayer/playlist/PlaylistListView.cpp b/src/apps/mediaplayer/playlist/PlaylistListView.cpp index 621cf1dfae..3e02d81889 100644 --- a/src/apps/mediaplayer/playlist/PlaylistListView.cpp +++ b/src/apps/mediaplayer/playlist/PlaylistListView.cpp @@ -384,10 +384,15 @@ PlaylistListView::_FullSync() if (!fPlaylist->Lock()) return; - // TODO: detach scrollbar, and this will be quick... -// BScrollBar* scrollBar = ScrollBar(B_VERTICAL); -// SetScrollBar(); -// + // detaching the scrollbar temporarily will + // make this much quicker + BScrollBar* scrollBar = ScrollBar(B_VERTICAL); + if (scrollBar) { + if (Window()) + Window()->UpdateIfNeeded(); + scrollBar->SetTarget((BView*)NULL); + } + MakeEmpty(); int32 count = fPlaylist->CountItems(); @@ -400,6 +405,12 @@ PlaylistListView::_FullSync() _SetCurrentPlaylistIndex(fPlaylist->CurrentRefIndex()); _SetPlaybackState(fController->PlaybackState()); + // reattach scrollbar and sync it by calling FrameResized() + if (scrollBar) { + scrollBar->SetTarget(this); + FrameResized(Bounds().Width(), Bounds().Height()); + } + fPlaylist->Unlock(); }