ensure we maintain category selection in browse view while indexing.

This commit is contained in:
casey langen 2017-07-05 16:24:03 -07:00
parent 28390f0819
commit ab58993c0f

View File

@ -157,11 +157,13 @@ void BrowseLayout::InitializeWindows() {
void BrowseLayout::ProcessMessage(musik::core::runtime::IMessage &message) { void BrowseLayout::ProcessMessage(musik::core::runtime::IMessage &message) {
if (message.Type() == message::IndexerProgress) { if (message.Type() == message::IndexerProgress) {
this->categoryList->Requery(); int64_t id = this->categoryList->GetSelectedId();
auto filter = this->categoryList->GetFilter();
this->categoryList->Requery(filter, id);
} }
else if (message.Type() == message::TracksAddedToPlaylist) { else if (message.Type() == message::TracksAddedToPlaylist) {
if (this->IsPlaylist() && if (this->IsPlaylist() &&
this->categoryList->GetSelectedId() == message.UserData1()) this->categoryList->GetSelectedId() == message.UserData1())
{ {
this->RequeryTrackList(this->categoryList.get()); this->RequeryTrackList(this->categoryList.get());
} }