From 497ccfaedce7bed91676e0c2c72b7d9370544ecf Mon Sep 17 00:00:00 2001 From: Kewlan Date: Fri, 30 Apr 2021 12:18:38 +0200 Subject: [PATCH] game_list: Fix dir move up/down expand state --- src/yuzu/game_list.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 48b78d65f..5ff3932dc 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -622,7 +622,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) { // move the treeview items QList item = item_model->takeRow(row); item_model->invisibleRootItem()->insertRow(row - 1, item); - tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); + tree_view->setExpanded(selected.sibling(row - 1, 0), + UISettings::values.game_dirs[other_index].expanded); }); connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] { @@ -637,7 +638,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) { // move the treeview items const QList item = item_model->takeRow(row); item_model->invisibleRootItem()->insertRow(row + 1, item); - tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); + tree_view->setExpanded(selected.sibling(row + 1, 0), + UISettings::values.game_dirs[other_index].expanded); }); connect(open_directory_location, &QAction::triggered, [this, game_dir_index] {