mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 14:58:55 +02:00
qt: ensure worker cancellation is complete before clearing
This commit is contained in:
parent
519c12da15
commit
faa6c35e78
3 changed files with 11 additions and 6 deletions
|
|
@ -826,12 +826,13 @@ void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs) {
|
|||
tree_view->setColumnHidden(COLUMN_SIZE, !UISettings::values.show_size);
|
||||
tree_view->setColumnHidden(COLUMN_PLAY_TIME, !UISettings::values.show_play_time);
|
||||
|
||||
// Before deleting rows, cancel the worker so that it is not using them
|
||||
emit ShouldCancelWorker();
|
||||
|
||||
// Delete any rows that might already exist if we're repopulating
|
||||
item_model->removeRows(0, item_model->rowCount());
|
||||
search_field->clear();
|
||||
|
||||
emit ShouldCancelWorker();
|
||||
|
||||
GameListWorker* worker =
|
||||
new GameListWorker(vfs, provider, game_dirs, compatibility_list, play_time_manager, system);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue