private void OnCurrentWorkspaceChanged(IWorkspaceModel workspace) { if (!IsIronPythonDialogOpen()) { UnSubscribeWorkspaceEvents(); CurrentWorkspace = workspace as WorkspaceModel; PythonDependencies.UpdateWorkspace(CurrentWorkspace); SubscribeToWorkspaceEvents(); NotificationTracker.Remove(CurrentWorkspace.Guid); GraphPythonDependencies.CustomNodePythonDependencyMap.Clear(); if (Configuration.DebugModes.IsEnabled("Python2ObsoleteMode") && !Models.DynamoModel.IsTestMode && PythonDependencies.CurrentWorkspaceHasIronPythonDependency()) { LogIronPythonNotification(); DisplayIronPythonDialog(); } } CurrentWorkspace.Nodes .Where(x => x is PythonNodeBase) .ToList() .ForEach(x => SubscribeToPythonNodeEvents(x as PythonNodeBase)); }
private void OnCurrentWorkspaceChanged(IWorkspaceModel workspace) { NotificationTracker.Remove(CurrentWorkspace.Guid); CurrentWorkspace = workspace as WorkspaceModel; if (PythonDependencies.ContainsIronPythonDependencies()) { LogIronPythonNotification(); DisplayIronPythonDialog(); } }