aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpieh <misiek.piechowiak@gmail.com>2011-09-26 12:49:04 +0200
committerpieh <misiek.piechowiak@gmail.com>2011-09-26 12:49:04 +0200
commit90116c3beb7b92702324ed7609212ae193588a1d (patch)
treebe4063756cebc366150ac3ff9aed994b058bf6cb
parent6c08a58b0f62bf06635927ce450221fc4e10ae0d (diff)
move ParentFolder item adding before filling default icons
-rw-r--r--xbmc/windows/GUIMediaWindow.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp
index b902a3bfbf..643e461c98 100644
--- a/xbmc/windows/GUIMediaWindow.cpp
+++ b/xbmc/windows/GUIMediaWindow.cpp
@@ -771,6 +771,18 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory)
// filtering on the items, setting thumbs.
OnPrepareFileItems(*m_vecItems);
+ // The idea here is to ensure we have something to focus if our file list
+ // is empty. As such, this check MUST be last and ignore the hide parent
+ // fileitems settings.
+ if (m_vecItems->IsEmpty())
+ {
+ CFileItemPtr pItem(new CFileItem(".."));
+ pItem->SetPath(m_history.GetParentPath());
+ pItem->m_bIsFolder = true;
+ pItem->m_bIsShareOrDrive = false;
+ m_vecItems->AddFront(pItem, 0);
+ }
+
m_vecItems->FillInDefaultIcons();
m_guiState.reset(CGUIViewState::GetViewState(GetID(), *m_vecItems));
@@ -838,18 +850,6 @@ void CGUIMediaWindow::OnFinalizeFileItems(CFileItemList &items)
items.ClearItems();
GetFilteredItems(filter, items);
}
-
- // The idea here is to ensure we have something to focus if our file list
- // is empty. As such, this check MUST be last and ignore the hide parent
- // fileitems settings.
- if (items.IsEmpty())
- {
- CFileItemPtr pItem(new CFileItem(".."));
- pItem->SetPath(m_history.GetParentPath());
- pItem->m_bIsFolder = true;
- pItem->m_bIsShareOrDrive = false;
- items.AddFront(pItem, 0);
- }
}
// \brief With this function you can react on a users click in the list/thumb panel.