mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Qt: release unused data when switching list modes
This commit is contained in:
parent
29256df5b1
commit
4d70c483b2
1 changed files with 6 additions and 1 deletions
|
@ -2255,7 +2255,10 @@ void game_list_frame::PopulateGameList()
|
|||
|
||||
const std::string selected_item = CurrentSelectionPath();
|
||||
|
||||
// Release old data
|
||||
m_game_grid->clear_list();
|
||||
m_game_list->clear_list();
|
||||
|
||||
m_game_list->setRowCount(m_game_data.size());
|
||||
|
||||
// Default locale. Uses current Qt application language.
|
||||
|
@ -2401,6 +2404,8 @@ void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, con
|
|||
|
||||
const std::string selected_item = CurrentSelectionPath();
|
||||
|
||||
// Release old data
|
||||
m_game_list->clear_list();
|
||||
m_game_grid->deleteLater();
|
||||
|
||||
const bool show_text = m_icon_size_index > gui::gl_max_slider_pos * 2 / 5;
|
||||
|
@ -2516,7 +2521,7 @@ std::string game_list_frame::CurrentSelectionPath()
|
|||
item = m_game_list->item(m_game_list->currentRow(), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (m_game_grid)
|
||||
{
|
||||
if (!m_game_grid->selectedItems().isEmpty())
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue