Resolved small TODO about detaching the scrollbar while doing bigger

changes to the list in order to speed those up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-06-26 22:40:00 +00:00
parent b9b511dc4f
commit 992a8afd5d
@@ -384,10 +384,15 @@ PlaylistListView::_FullSync()
if (!fPlaylist->Lock()) if (!fPlaylist->Lock())
return; return;
// TODO: detach scrollbar, and this will be quick... // detaching the scrollbar temporarily will
// BScrollBar* scrollBar = ScrollBar(B_VERTICAL); // make this much quicker
// SetScrollBar(); BScrollBar* scrollBar = ScrollBar(B_VERTICAL);
// if (scrollBar) {
if (Window())
Window()->UpdateIfNeeded();
scrollBar->SetTarget((BView*)NULL);
}
MakeEmpty(); MakeEmpty();
int32 count = fPlaylist->CountItems(); int32 count = fPlaylist->CountItems();
@@ -400,6 +405,12 @@ PlaylistListView::_FullSync()
_SetCurrentPlaylistIndex(fPlaylist->CurrentRefIndex()); _SetCurrentPlaylistIndex(fPlaylist->CurrentRefIndex());
_SetPlaybackState(fController->PlaybackState()); _SetPlaybackState(fController->PlaybackState());
// reattach scrollbar and sync it by calling FrameResized()
if (scrollBar) {
scrollBar->SetTarget(this);
FrameResized(Bounds().Width(), Bounds().Height());
}
fPlaylist->Unlock(); fPlaylist->Unlock();
} }