mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Qt: fix possible race in RepaintIcons
This might also improve performance while scrubbing the icon size slider
This commit is contained in:
parent
27cc5c8a63
commit
2dc6adc038
@ -2014,6 +2014,12 @@ void game_list_frame::ResizeIcons(const int& slider_pos)
|
|||||||
|
|
||||||
void game_list_frame::RepaintIcons(const bool& from_settings)
|
void game_list_frame::RepaintIcons(const bool& from_settings)
|
||||||
{
|
{
|
||||||
|
if (m_repaint_watcher.isRunning())
|
||||||
|
{
|
||||||
|
m_repaint_watcher.cancel();
|
||||||
|
m_repaint_watcher.waitForFinished();
|
||||||
|
}
|
||||||
|
|
||||||
if (from_settings)
|
if (from_settings)
|
||||||
{
|
{
|
||||||
if (m_gui_settings->GetValue(gui::m_enableUIColors).toBool())
|
if (m_gui_settings->GetValue(gui::m_enableUIColors).toBool())
|
||||||
@ -2051,12 +2057,6 @@ void game_list_frame::RepaintIcons(const bool& from_settings)
|
|||||||
m_game_list->resizeColumnToContents(gui::column_count - 1);
|
m_game_list->resizeColumnToContents(gui::column_count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_repaint_watcher.isRunning())
|
|
||||||
{
|
|
||||||
m_repaint_watcher.cancel();
|
|
||||||
m_repaint_watcher.waitForFinished();
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::function func = [this](const game_info& game) -> movie_item*
|
const std::function func = [this](const game_info& game) -> movie_item*
|
||||||
{
|
{
|
||||||
if (game->icon.isNull() && (game->info.icon_path.empty() || !game->icon.load(qstr(game->info.icon_path))))
|
if (game->icon.isNull() && (game->info.icon_path.empty() || !game->icon.load(qstr(game->info.icon_path))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user