mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-04 17:38:05 +00:00
Fixed bug where selection and scroll position may get funky when
switching categories in browse view.
This commit is contained in:
parent
8b307af421
commit
6ec4fe0b30
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user