xbmc/xbmc — pull request #5742 by Jalle19 (2014-11-17 14:01:37+00:00)
Title: [pvr] Fix recording history (last directory not selected)

This fixes an ancient bug where the selected item is always the top one in the list after you go back from a recording sub directory. The root cause is two-fold:

* we've called `m_vecItems->SetPath()` manually before updating the window contents. This is wrong since the history manager excepts the item path to be that of the previous window, not the window we are about to enter. The first commit fixes that by removing the `Update()` method override from `CGUIWindowPVRBase`.

* the next issue cropped up after fixing the previous one. The problem now is that the view state which (among other things) controls whether the "go to parent" item should be shown at the top of lists held a reference to the previous directory's items at a time when it should have had the new list. This fixes that by simply moving the call a bit earlier in the chain.

@Montellese regarding the second one, do you know enough about this part to comment on it? I haven't tested all possible scenarios, just that the recordings window works

@xhaggi @opdenkamp for the usual review

@topfs2 for Helix unless someone complains