From 8fa3da60845565e449c75711c6b053af001eb892 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Mon, 24 Jun 2024 17:05:53 +0100 Subject: [PATCH] resurrect DocumentStore subscriptions --- .../Utils/ArcGisDocumentStore.cs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/Utils/ArcGisDocumentStore.cs b/DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/Utils/ArcGisDocumentStore.cs index db0df3550f..449b848b74 100644 --- a/DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/Utils/ArcGisDocumentStore.cs +++ b/DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/Utils/ArcGisDocumentStore.cs @@ -18,17 +18,23 @@ ITopLevelExceptionHandler topLevelExceptionHandler ) : base(serializerOption, true) { - ActiveMapViewChangedEvent.Subscribe(a => topLevelExceptionHandler.CatchUnhandled(() => OnMapViewChanged(a))); - ProjectSavingEvent.Subscribe(_ => - { - topLevelExceptionHandler.CatchUnhandled(OnProjectSaving); - return Task.CompletedTask; - }); - ProjectClosingEvent.Subscribe(_ => - { - topLevelExceptionHandler.CatchUnhandled(OnProjectClosing); - return Task.CompletedTask; - }); + ActiveMapViewChangedEvent.Subscribe(a => topLevelExceptionHandler.CatchUnhandled(() => OnMapViewChanged(a)), true); + ProjectSavingEvent.Subscribe( + _ => + { + topLevelExceptionHandler.CatchUnhandled(OnProjectSaving); + return Task.CompletedTask; + }, + true + ); + ProjectClosingEvent.Subscribe( + _ => + { + topLevelExceptionHandler.CatchUnhandled(OnProjectClosing); + return Task.CompletedTask; + }, + true + ); } private void OnProjectClosing()