From c24bc981b058aec87d5e7b02fc26efa5f9b5aeb1 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 5 Jan 2024 08:09:54 +0100 Subject: [PATCH] :fixed filtering by berth id, also including outgoing and shifting moves --- src/BreCalClient/MainWindow.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs index 355c375..4d13c6b 100644 --- a/src/BreCalClient/MainWindow.xaml.cs +++ b/src/BreCalClient/MainWindow.xaml.cs @@ -516,7 +516,8 @@ namespace BreCalClient if(sfm.Berths.Count > 0 ) { - this._visibleControlModels.RemoveAll(x => !sfm.Berths.Contains((x.Shipcall?.ArrivalBerthId) ?? -1)); + this._visibleControlModels.RemoveAll(x => (!sfm.Berths.Contains((x.Shipcall?.ArrivalBerthId) ?? -1) && (x.Shipcall?.Type == (int) Extensions.TypeEnum.Incoming)) || + (!sfm.Berths.Contains((x.Shipcall?.DepartureBerthId) ?? -1) && (x.Shipcall?.Type != (int) Extensions.TypeEnum.Incoming))); } if(sfm.Agencies.Count > 0 )