Fixed bug where ship was not initially shown in overview

This commit is contained in:
Daniel Schick 2024-04-19 16:55:29 +02:00
parent 634c638e27
commit b0c6b639be

View File

@ -108,6 +108,8 @@ namespace BreCalClient
this.dataGridShips.ItemsSource = null; this.dataGridShips.ItemsSource = null;
BreCalLists.AllShips.Add(shipModel); BreCalLists.AllShips.Add(shipModel);
BreCalLists.Ships.Add(shipModel); BreCalLists.Ships.Add(shipModel);
if(!BreCalLists.ShipLookupDict.TryAdd(id.VarId, shipModel))
BreCalLists.ShipLookupDict[id.VarId] = shipModel;
this.dataGridShips.ItemsSource = BreCalLists.AllShips; this.dataGridShips.ItemsSource = BreCalLists.AllShips;
} }
} }