Skip to content

Commit fc1ae8a

Browse files
authored
DYN-9879: Py Engine Change pops up erroneously (#16747)
1 parent 50f6495 commit fc1ae8a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,11 @@ private void DynamoViewModelRequestUserSaveWorkflow(object sender, WorkspaceSave
17551755

17561756
// Show the one-time Python Engine Change notification for the workspace
17571757
var ws = dynamoViewModel.Model.CurrentWorkspace;
1758-
if (!ws.HasShownPythonAutoMigrationNotification && ws.ShowPythonAutoMigrationNotifications)
1758+
var prefSettings = dynamoViewModel.Model.PreferenceSettings;
1759+
1760+
if (!ws.HasShownPythonAutoMigrationNotification
1761+
&& ws.ShowPythonAutoMigrationNotifications
1762+
&& prefSettings.ShowPythonAutoMigrationNotifications)
17591763
{
17601764
var cancelFirstDialogBox = ShowPythonEngineChangeNoticeAndMarkIfProceed();
17611765
if (cancelFirstDialogBox)

src/PythonMigrationViewExtension/PythonMigrationViewExtension.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ private void OnCurrentWorkspaceCleared(IWorkspaceModel workspace)
343343
// Close the CPython toast notification when workspace is cleared/closed
344344
DynamoViewModel.ToastManager?.CloseRealTimeInfoWindow();
345345
lastWorkspaceGuid = Guid.Empty;
346+
CurrentWorkspace.ShowPythonAutoMigrationNotifications = false;
346347
}
347348

348349
private void OnWorkspaceRemoveStarted(IWorkspaceModel workspace)
@@ -515,7 +516,7 @@ private void MigrateCPythonNodesForWorkspace()
515516
customCount,
516517
LoadedParams.StartupParams.PathManager.BackupDirectory);
517518

518-
CurrentWorkspace.ShowPythonAutoMigrationNotifications = preferenceSettings.ShowPythonAutoMigrationNotifications;
519+
CurrentWorkspace.ShowPythonAutoMigrationNotifications = true;
519520
}
520521
}
521522

0 commit comments

Comments
 (0)