diff --git a/rpcs3/rpcs3qt/game_list.cpp b/rpcs3/rpcs3qt/game_list.cpp index c60dd712a8..77f015f7cf 100644 --- a/rpcs3/rpcs3qt/game_list.cpp +++ b/rpcs3/rpcs3qt/game_list.cpp @@ -14,6 +14,30 @@ game_list::game_list() : QTableWidget(), game_list_base() }; } +void game_list::sync_header_actions(QList& actions, std::function get_visibility) +{ + ensure(get_visibility); + + bool is_dirty = false; + + for (int col = 0; col < actions.count(); ++col) + { + const bool is_hidden = !get_visibility(col); + actions[col]->setChecked(!is_hidden); + + if (isColumnHidden(col) != is_hidden) + { + setColumnHidden(col, is_hidden); + is_dirty = true; + } + } + + if (is_dirty) + { + fix_narrow_columns(); + } +} + void game_list::create_header_actions(QList& actions, std::function get_visibility, std::function set_visibility) { ensure(get_visibility); @@ -48,6 +72,7 @@ void game_list::create_header_actions(QList& actions, std::function