summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Morph2021-05-02 07:43:45 -0400
committerGravatar GitHub2021-05-02 07:43:45 -0400
commit0d2d0844a5b4b189c13f326466b2b2ab94676cd4 (patch)
tree99c7d62004bcefcd339f88709863446bb5dab419
parentMerge pull request #6265 from Morph1984/snap-save-fix (diff)
parentgame_list: Fix dir move up/down expand state (diff)
downloadyuzu-0d2d0844a5b4b189c13f326466b2b2ab94676cd4.tar.gz
yuzu-0d2d0844a5b4b189c13f326466b2b2ab94676cd4.tar.xz
yuzu-0d2d0844a5b4b189c13f326466b2b2ab94676cd4.zip
Merge pull request #6263 from Kewlan/folder-swap-expand-state
game_list: Fix dir move up/down expand state
Diffstat (limited to '')
-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 827bc10e7..63cf82f7d 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -623,7 +623,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
623 // move the treeview items 623 // move the treeview items
624 QList<QStandardItem*> item = item_model->takeRow(row); 624 QList<QStandardItem*> item = item_model->takeRow(row);
625 item_model->invisibleRootItem()->insertRow(row - 1, item); 625 item_model->invisibleRootItem()->insertRow(row - 1, item);
626 tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); 626 tree_view->setExpanded(selected.sibling(row - 1, 0),
627 UISettings::values.game_dirs[other_index].expanded);
627 }); 628 });
628 629
629 connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] { 630 connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] {
@@ -638,7 +639,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
638 // move the treeview items 639 // move the treeview items
639 const QList<QStandardItem*> item = item_model->takeRow(row); 640 const QList<QStandardItem*> item = item_model->takeRow(row);
640 item_model->invisibleRootItem()->insertRow(row + 1, item); 641 item_model->invisibleRootItem()->insertRow(row + 1, item);
641 tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); 642 tree_view->setExpanded(selected.sibling(row + 1, 0),
643 UISettings::values.game_dirs[other_index].expanded);
642 }); 644 });
643 645
644 connect(open_directory_location, &QAction::triggered, [this, game_dir_index] { 646 connect(open_directory_location, &QAction::triggered, [this, game_dir_index] {