Skip to content

Commit

Permalink
[gui] reset view state directly after directory was fetched
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaggi committed Jan 20, 2015
1 parent c9e254c commit 9fcff9a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions xbmc/windows/GUIMediaWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,7 @@ bool CGUIMediaWindow::GetDirectory(const std::string &strDirectory, CFileItemLis
m_history.RemoveParentPath();
}

// update the view state to the currently fetched items
// TODO we should remove the second call m_guiState.reset() in Update() and pass the right file item ref here
// update the view state's reference to the current items
m_guiState.reset(CGUIViewState::GetViewState(GetID(), items));

if (m_guiState.get() && !m_guiState->HideParentDirItems() && !items.GetPath().empty())
Expand Down Expand Up @@ -823,8 +822,6 @@ bool CGUIMediaWindow::Update(const std::string &strDirectory, bool updateFilterP

m_vecItems->FillInDefaultIcons();

m_guiState.reset(CGUIViewState::GetViewState(GetID(), *m_vecItems));

// remember the original (untouched) list of items (for filtering etc)
m_unfilteredItems->SetPath(m_vecItems->GetPath()); // use the original path - it'll likely be relied on for other things later.
m_unfilteredItems->Append(*m_vecItems);
Expand Down

0 comments on commit 9fcff9a

Please sign in to comment.