summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Bosshard <nico@bosshome.ch>2017-05-06 12:08:28 +0200
committerNico Bosshard <nico@bosshome.ch>2017-05-06 12:08:28 +0200
commitdb256ea395e3b160bd161ddb5205870c29697150 (patch)
tree7c143281fe31e3f7d3ae79101debe073e1f1e20c
parentFixed some more typos (diff)
downloadyuzu-db256ea395e3b160bd161ddb5205870c29697150.tar
yuzu-db256ea395e3b160bd161ddb5205870c29697150.tar.gz
yuzu-db256ea395e3b160bd161ddb5205870c29697150.tar.bz2
yuzu-db256ea395e3b160bd161ddb5205870c29697150.tar.lz
yuzu-db256ea395e3b160bd161ddb5205870c29697150.tar.xz
yuzu-db256ea395e3b160bd161ddb5205870c29697150.tar.zst
yuzu-db256ea395e3b160bd161ddb5205870c29697150.zip
-rw-r--r--src/citra_qt/game_list.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp
index 582aa0857..51257520b 100644
--- a/src/citra_qt/game_list.cpp
+++ b/src/citra_qt/game_list.cpp
@@ -236,7 +236,9 @@ GameList::~GameList() {
}
void GameList::setFilterFocus() {
- search_field->setFocus();
+ if (tree_view->model()->rowCount() > 0) {
+ search_field->setFocus();
+ }
}
void GameList::setFilterVisible(bool visibility) {
@@ -271,7 +273,9 @@ void GameList::DonePopulating() {
tree_view->setEnabled(true);
int rowCount = tree_view->model()->rowCount();
search_field->setFilterResult(rowCount, rowCount);
- search_field->setFocus();
+ if (rowCount > 0) {
+ search_field->setFocus();
+ }
}
void GameList::PopupContextMenu(const QPoint& menu_location) {
@@ -296,7 +300,6 @@ void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) {
!FileUtil::IsDirectory(dir_path.toStdString())) {
LOG_ERROR(Frontend, "Could not find game list folder at %s", dir_path.toLocal8Bit().data());
search_field->setFilterResult(0, 0);
- search_field->setFocus();
return;
}