From 96b1f4b514211c4a017fc9c21c562cf6a1867fa7 Mon Sep 17 00:00:00 2001 From: Koerty Date: Sat, 31 Mar 2018 16:01:18 +0200 Subject: [PATCH] Small fix to the populateList function of the GridGameListView - Call the addPlaceholder function if grid is empty - Set the header text --- es-app/src/views/gamelist/GridGameListView.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index 915ce7695..8fb6edf8b 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -38,9 +38,17 @@ bool GridGameListView::input(InputConfig* config, Input input) void GridGameListView::populateList(const std::vector& files) { mGrid.clear(); - for(auto it = files.cbegin(); it != files.cend(); it++) + mHeaderText.setText(mRoot->getSystem()->getFullName()); + if (files.size() > 0) { - mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it); + for (auto it = files.cbegin(); it != files.cend(); it++) + { + mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it); + } + } + else + { + addPlaceholder(); } }