From 8f55cc11a900f5acddebdde61a5da68dd10c09f0 Mon Sep 17 00:00:00 2001 From: Branko Zachemsky Date: Wed, 16 Aug 2023 08:19:51 +0200 Subject: [PATCH] Change starting and stoping observing changes --- .../AxoDataExchange/DataExchangeViewModel.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/data/src/AXOpen.Data.Blazor/AxoDataExchange/DataExchangeViewModel.cs b/src/data/src/AXOpen.Data.Blazor/AxoDataExchange/DataExchangeViewModel.cs index d8240d016..371461ec8 100644 --- a/src/data/src/AXOpen.Data.Blazor/AxoDataExchange/DataExchangeViewModel.cs +++ b/src/data/src/AXOpen.Data.Blazor/AxoDataExchange/DataExchangeViewModel.cs @@ -59,8 +59,6 @@ public IBrowsableDataObject SelectedRecord set { - DataExchange.ChangeTrackerStopObservingChanges(); - _selectedRecord = value; if (value != null) { @@ -68,8 +66,6 @@ public IBrowsableDataObject SelectedRecord DataExchange.ChangeTrackerSetChanges(value); Changes = DataExchange.ChangeTrackerGetChanges().OrderBy(p => p.DateTime.Ticks).ToList(); } - - DataExchange.ChangeTrackerStartObservingChanges(Asp.GetAuthenticationStateAsync().Result); } } @@ -78,6 +74,7 @@ public void Locked() if (IsLockedByMeOrNull()) { DataExchange.SetLockedBy(this); + DataExchange.ChangeTrackerStartObservingChanges(Asp.GetAuthenticationStateAsync().Result); } } @@ -85,6 +82,7 @@ public void UnLocked() { if (IsLockedByMeOrNull()) { + DataExchange.ChangeTrackerStopObservingChanges(); DataExchange.SetLockedBy(null); } }