Fixed a bug where complete shiplist was selectable instead of only non-deleted ships after closing the shiplist editor

This commit is contained in:
Daniel Schick 2024-04-22 09:18:54 +02:00
parent ec65355473
commit f87901e432
3 changed files with 13 additions and 7 deletions

View File

@ -396,7 +396,7 @@ namespace BreCalClient
// reload combobox
this.comboBoxShip.ItemsSource = null;
this.comboBoxShip.ItemsSource = BreCalLists.AllShips;
this.comboBoxShip.ItemsSource = BreCalLists.Ships;
}
#endregion

View File

@ -269,9 +269,13 @@ namespace BreCalClient
// if this was an arrival, create the matching departure call and open it
if (esc.ShipcallModel.Shipcall?.Type == ShipcallType.Arrival)
{
ShipcallControlModel scmOut = new();
scmOut.Shipcall = new();
scmOut.Shipcall.Type = ShipcallType.Departure;
ShipcallControlModel scmOut = new()
{
Shipcall = new()
{
Type = ShipcallType.Departure
}
};
scmOut.Shipcall.ShipId = esc.ShipcallModel.Shipcall.ShipId;
scmOut.Ship = esc.ShipcallModel.Ship;
DateTime eta = esc.ShipcallModel.Shipcall?.Eta ?? DateTime.Now;
@ -292,8 +296,10 @@ namespace BreCalClient
private void buttonInfo_Click(object sender, RoutedEventArgs e)
{
AboutDialog ad = new();
ad.LoginResult = this._loginResult;
AboutDialog ad = new()
{
LoginResult = this._loginResult
};
ad.ChangePasswordRequested += async (oldPw, newPw) =>
{
if (_loginResult != null)

View File

@ -90,7 +90,7 @@ namespace BreCalClient
private async void DataGridShips_CreateRequested()
{
ShipModel shipModel = new ShipModel(new Ship());
ShipModel shipModel = new(new Ship());
EditShipDialog esd = new()
{
Ship = shipModel.Ship