summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Kewlan2021-04-30 12:18:38 +0200
committerGravatar Kewlan2021-04-30 12:18:38 +0200
commit497ccfaedce7bed91676e0c2c72b7d9370544ecf (patch)
tree7ae77ac210866b8603a156d0d4449a77f3e52f19 /src
parentMerge pull request #6226 from german77/sevensix (diff)
downloadyuzu-497ccfaedce7bed91676e0c2c72b7d9370544ecf.tar.gz
yuzu-497ccfaedce7bed91676e0c2c72b7d9370544ecf.tar.xz
yuzu-497ccfaedce7bed91676e0c2c72b7d9370544ecf.zip
game_list: Fix dir move up/down expand state
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/game_list.cpp6
1 files 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) {
622 // move the treeview items 622 // move the treeview items
623 QList<QStandardItem*> item = item_model->takeRow(row); 623 QList<QStandardItem*> item = item_model->takeRow(row);
624 item_model->invisibleRootItem()->insertRow(row - 1, item); 624 item_model->invisibleRootItem()->insertRow(row - 1, item);
625 tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); 625 tree_view->setExpanded(selected.sibling(row - 1, 0),
626 UISettings::values.game_dirs[other_index].expanded);
626 }); 627 });
627 628
628 connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] { 629 connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] {
@@ -637,7 +638,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
637 // move the treeview items 638 // move the treeview items
638 const QList<QStandardItem*> item = item_model->takeRow(row); 639 const QList<QStandardItem*> item = item_model->takeRow(row);
639 item_model->invisibleRootItem()->insertRow(row + 1, item); 640 item_model->invisibleRootItem()->insertRow(row + 1, item);
640 tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); 641 tree_view->setExpanded(selected.sibling(row + 1, 0),
642 UISettings::values.game_dirs[other_index].expanded);
641 }); 643 });
642 644
643 connect(open_directory_location, &QAction::triggered, [this, game_dir_index] { 645 connect(open_directory_location, &QAction::triggered, [this, game_dir_index] {