Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,7 @@ internal void OpenFileFromPathCore(string filePath, bool forceManualExecutionMod
// When Json opening failed, either this file is corrupted or file might be XML
if (ex is JsonReaderException && DynamoUtilities.PathHelper.isValidXML(filePathToOpen, out xmlDoc, out ex))
{
openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode);
openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode, forceBlockRun: forceBlockRun);
return;
}
else
Expand Down Expand Up @@ -2465,8 +2465,9 @@ private void InsertJsonFileFromPath(string fileContents, string filePath, bool f
/// <param name="forceManualExecutionMode">Set this to true to discard
/// execution mode specified in the file and set manual mode</param>
/// <param name="isTemplate">When true, marks the opened workspace as a template (for example when opened via <see cref="OpenTemplateFromPath"/>).</param>
/// <param name="forceBlockRun">Set this to true to block the graph from running after opening.</param>
/// <returns>True if workspace was opened successfully</returns>
private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false)
private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false, bool forceBlockRun = false)
{
try
{
Expand All @@ -2491,6 +2492,8 @@ private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool force
if (OpenXmlFile(workspaceInfo, xmlDoc, out ws))
{
ws.IsTemplate = isTemplate;
if (ws is HomeWorkspaceModel homeWs && homeWs.RunSettings != null)
homeWs.RunSettings.ForceBlockRun = forceBlockRun;
OpenWorkspace(ws);

// Set up workspace cameras here
Expand Down
Loading