From b0c6b639be47fab07b949cfe63331a5ea2dcd8db Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 19 Apr 2024 16:55:29 +0200 Subject: [PATCH] Fixed bug where ship was not initially shown in overview --- src/BreCalClient/ShipListDialog.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BreCalClient/ShipListDialog.xaml.cs b/src/BreCalClient/ShipListDialog.xaml.cs index e22d814..5d862ab 100644 --- a/src/BreCalClient/ShipListDialog.xaml.cs +++ b/src/BreCalClient/ShipListDialog.xaml.cs @@ -108,6 +108,8 @@ namespace BreCalClient this.dataGridShips.ItemsSource = null; BreCalLists.AllShips.Add(shipModel); BreCalLists.Ships.Add(shipModel); + if(!BreCalLists.ShipLookupDict.TryAdd(id.VarId, shipModel)) + BreCalLists.ShipLookupDict[id.VarId] = shipModel; this.dataGridShips.ItemsSource = BreCalLists.AllShips; } }