From 516054325d4f89c971043d934aa51ef9853bdd16 Mon Sep 17 00:00:00 2001 From: ZiyunShang <33445445+ZiyunShang@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:39:14 +0800 Subject: [PATCH] Change DefaultWatch3DViewModel property - Active to virtual (#11597) * Change DefaultWatch3DViewModel property - Active to virtual * Add comment to ShowEdge changes. --- src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | 5 ++++- .../ViewModels/Watch3D/DefaultWatch3DViewModel.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index 83f68be3e3d..0e4131695ae 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -699,7 +699,10 @@ private void RenderPackageFactoryViewModel_PropertyChanged(object sender, Proper // A full regeneration is required to get the edge geometry. foreach (var vm in Watch3DViewModels) { - vm.RegenerateAllPackages(); + if (vm is HelixWatch3DViewModel) // just need a full regeneration when vm is HelixWatch3DViewModel + { + vm.RegenerateAllPackages(); + } } break; case "MaxTessellationDivisions": diff --git a/src/DynamoCoreWpf/ViewModels/Watch3D/DefaultWatch3DViewModel.cs b/src/DynamoCoreWpf/ViewModels/Watch3D/DefaultWatch3DViewModel.cs index b6e9c40664b..bc185d13bff 100644 --- a/src/DynamoCoreWpf/ViewModels/Watch3D/DefaultWatch3DViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Watch3D/DefaultWatch3DViewModel.cs @@ -78,7 +78,7 @@ public class DefaultWatch3DViewModel : NotificationObject, IWatch3DViewModel, ID /// geometry updates. When set to False, the Watch3DView corresponding /// to this view model is not displayed. /// - public bool Active + public virtual bool Active { get { return active; } set