From 28142be7cc88dd14f6ecb4d55828677c1303f4e7 Mon Sep 17 00:00:00 2001 From: Lesueur Benjamin Date: Fri, 21 Aug 2020 15:37:14 +0200 Subject: [PATCH] fixed an issue where an updated title would not be properly displayed on the game list --- DockerForm/Form1.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/DockerForm/Form1.cs b/DockerForm/Form1.cs index bd0e46a..93ac3e7 100644 --- a/DockerForm/Form1.cs +++ b/DockerForm/Form1.cs @@ -255,8 +255,21 @@ public void InsertOrUpdateGameItem(DockerGame game) { GameList.Items.Add(newitem); DatabaseManager.GameDB[game.GUID] = game; - - UpdateLog("[" + game.Name + "] has been added to the database"); + UpdateLog("[" + game.Name + "] profile has been added to the database"); + } + else + { + for (int i = 0; i < GameList.Items.Count; i++) + { + exListBoxItem item = (exListBoxItem)GameList.Items[i]; + if (item.Guid == game.GUID) + { + GameList.Items[i] = newitem; + DatabaseManager.GameDB[game.GUID] = game; + UpdateLog("[" + game.Name + "] profile has been updated"); + break; + } + } } // Update current title