mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #6263 from Kewlan/folder-swap-expand-state
game_list: Fix dir move up/down expand state
This commit is contained in:
commit
0d2d0844a5
@ -623,7 +623,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
|||||||
// move the treeview items
|
// move the treeview items
|
||||||
QList<QStandardItem*> item = item_model->takeRow(row);
|
QList<QStandardItem*> item = item_model->takeRow(row);
|
||||||
item_model->invisibleRootItem()->insertRow(row - 1, item);
|
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] {
|
connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] {
|
||||||
@ -638,7 +639,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
|||||||
// move the treeview items
|
// move the treeview items
|
||||||
const QList<QStandardItem*> item = item_model->takeRow(row);
|
const QList<QStandardItem*> item = item_model->takeRow(row);
|
||||||
item_model->invisibleRootItem()->insertRow(row + 1, item);
|
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] {
|
connect(open_directory_location, &QAction::triggered, [this, game_dir_index] {
|
||||||
|
Loading…
Reference in New Issue
Block a user