mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
Qt: simplify occasions of restoreState
This commit is contained in:
parent
31101b4828
commit
bff9a06f9f
3 changed files with 5 additions and 31 deletions
|
@ -174,12 +174,7 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
void game_list_frame::LoadSettings()
|
||||
{
|
||||
QByteArray state = xgui_settings->GetValue(gui::gl_state).toByteArray();
|
||||
|
||||
if (!state.isEmpty())
|
||||
{
|
||||
m_gameList->horizontalHeader()->restoreState(state);
|
||||
}
|
||||
else if (m_gameList->rowCount() > 0)
|
||||
if (!m_gameList->horizontalHeader()->restoreState(state) && m_gameList->rowCount())
|
||||
{
|
||||
// If no settings exist, go to default.
|
||||
m_gameList->verticalHeader()->resizeSections(QHeaderView::ResizeMode::ResizeToContents);
|
||||
|
@ -198,9 +193,7 @@ void game_list_frame::LoadSettings()
|
|||
m_gameList->horizontalHeader()->restoreState(m_gameList->horizontalHeader()->saveState());
|
||||
|
||||
m_colSortOrder = xgui_settings->GetValue(gui::gl_sortAsc).toBool() ? Qt::AscendingOrder : Qt::DescendingOrder;
|
||||
|
||||
m_sortColumn = xgui_settings->GetValue(gui::gl_sortCol).toInt();
|
||||
|
||||
m_categoryFilters = xgui_settings->GetGameListCategoryFilters();
|
||||
|
||||
Refresh(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue