[GamesModel] Clear games types before merging (#7156)

Took 7 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL
2026-08-23 01:47:48 +02:00
committed by GitHub
parent 88aa036f7e
commit fc0199d3db

View File

@@ -285,6 +285,9 @@ void GamesModel::updateGameList(const ServerInfo_Game &game)
gameList.removeAt(i);
endRemoveRows();
} else {
// MergeFrom concatenates repeated fields instead of replacing them,
// so clear game_types first to avoid duplicated entries.
gameList[i].clear_game_types();
gameList[i].MergeFrom(game);
emit dataChanged(index(i, 0), index(i, NUM_COLS - 1));
}