From 8b7c127e93090e51ab3065827daa5727df6e255a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Koral?= <45078678+oguzhankoral@users.noreply.github.com> Date: Mon, 21 Apr 2025 15:49:59 +0300 Subject: [PATCH] Revert "Fix the object tracking for next session (#765)" (#766) This reverts commit c10c03637acb6b463eace4e3969f6fe889592d6e. --- .../Bindings/RevitSendBinding.cs | 4 ---- DUI3/Speckle.Connectors.DUI/Models/DocumentModelStore.cs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Connectors/Revit/Speckle.Connectors.RevitShared/Bindings/RevitSendBinding.cs b/Connectors/Revit/Speckle.Connectors.RevitShared/Bindings/RevitSendBinding.cs index 1d40afda6..f87a4f2c0 100644 --- a/Connectors/Revit/Speckle.Connectors.RevitShared/Bindings/RevitSendBinding.cs +++ b/Connectors/Revit/Speckle.Connectors.RevitShared/Bindings/RevitSendBinding.cs @@ -263,10 +263,6 @@ internal sealed class RevitSendBinding : RevitBaseBinding, ISendBinding modelCard.SendFilter.IdMap, newSelectedObjectIds ); - - // In UI, we are not explicitly trigger UpdateModel to save the state into file for some edge cases. Instead we save it directly via document model store. - // Comment in the UI -> """ otherwise it is leading cleanup on document store bc of deferred action when we switched to the another doc""" - _store.SaveState(); } return documentElementContexts; diff --git a/DUI3/Speckle.Connectors.DUI/Models/DocumentModelStore.cs b/DUI3/Speckle.Connectors.DUI/Models/DocumentModelStore.cs index a4e0c7c09..dc82c2b61 100644 --- a/DUI3/Speckle.Connectors.DUI/Models/DocumentModelStore.cs +++ b/DUI3/Speckle.Connectors.DUI/Models/DocumentModelStore.cs @@ -133,7 +133,7 @@ public abstract class DocumentModelStore(IJsonSerializer serializer) // POC: this seemms more like a IModelsDeserializer?, seems disconnected from this class protected List Deserialize(string models) => serializer.Deserialize>(models).NotNull(); - public void SaveState() + protected void SaveState() { lock (_models) {