diff --git a/src/DynamoCore/Models/DynamoModelCommands.cs b/src/DynamoCore/Models/DynamoModelCommands.cs
index 5e607c41bf0..ee1ee7d76d5 100644
--- a/src/DynamoCore/Models/DynamoModelCommands.cs
+++ b/src/DynamoCore/Models/DynamoModelCommands.cs
@@ -597,12 +597,15 @@ private void UpdateModelValueImpl(UpdateModelValueCommand command)
WorkspaceModel targetWorkspace = CurrentWorkspace;
if (!command.WorkspaceGuid.Equals(Guid.Empty))
targetWorkspace = Workspaces.FirstOrDefault(w => w.Guid.Equals(command.WorkspaceGuid));
-
- if (targetWorkspace != null)
+ try
{
- targetWorkspace.UpdateModelValue(command.ModelGuids,
+ targetWorkspace?.UpdateModelValue(command.ModelGuids,
command.Name, command.Value);
}
+ catch (Exception ex)
+ {
+ Logger.LogError(ex.Message);
+ }
}
private void ConvertNodesToCodeImpl(ConvertNodesToCodeCommand command)
diff --git a/src/DynamoCoreWpf/Commands/WorkspaceCommands.cs b/src/DynamoCoreWpf/Commands/WorkspaceCommands.cs
index 364ba07953a..f01c91f058c 100644
--- a/src/DynamoCoreWpf/Commands/WorkspaceCommands.cs
+++ b/src/DynamoCoreWpf/Commands/WorkspaceCommands.cs
@@ -26,6 +26,7 @@ public partial class WorkspaceViewModel
private DelegateCommand showHideAllGeometryPreviewCommand;
private DelegateCommand showInCanvasSearchCommand;
private DelegateCommand pasteCommand;
+ private DelegateCommand hideAllPopupCommand;
#endregion
@@ -214,6 +215,21 @@ public DelegateCommand ShowInCanvasSearchCommand
return showInCanvasSearchCommand;
}
}
+
+ ///
+ /// View Command to hide all popup in special cases
+ ///
+ [JsonIgnore]
+ public DelegateCommand HideAllPopupCommand
+ {
+ get
+ {
+ if (hideAllPopupCommand == null)
+ hideAllPopupCommand = new DelegateCommand(OnRequestHideAllPopup);
+
+ return hideAllPopupCommand;
+ }
+ }
#endregion
#region Properties for Command Data Binding
diff --git a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
index d35224e7651..e8dbea72f20 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
@@ -162,6 +162,12 @@ private void OnRequestShowInCanvasSearch(object param)
RequestShowInCanvasSearch?.Invoke(flag);
}
+ internal event Action