Fixed bug where selection and scroll position may get funky when

switching categories in browse view.
This commit is contained in:
casey langen 2017-12-13 23:23:24 -08:00
parent 8b307af421
commit 6ec4fe0b30

View File

@ -143,17 +143,19 @@ std::string CategoryListView::GetFilter() {
}
void CategoryListView::OnTrackChanged(size_t index, musik::core::TrackPtr track) {
this->playing = track;
this->OnAdapterChanged();
this->playing = track;
this->OnAdapterChanged();
}
void CategoryListView::SetFieldName(const std::string& fieldName) {
if (this->fieldName != fieldName) {
this->selectAfterQuery = 0;
this->fieldName = fieldName;
this->SetSelectedIndex(0);
this->ScrollToTop();
if (this->metadata) {
this->metadata.reset();
this->ScrollToTop();
}
this->Requery();