From fbcbbc7b05935ec8a7b5a45d058f5e6ed31c3f6c Mon Sep 17 00:00:00 2001 From: ReignOfComputer Date: Thu, 13 Feb 2020 01:58:46 +0800 Subject: [PATCH] Batch Editor Alert Fix (#2703) Running a batch editor job in the same window pops the alert message in incrementing numbers until the window is closed. --- PKHeX.WinForms/Subforms/PKM Editors/BatchEditor.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/Subforms/PKM Editors/BatchEditor.cs b/PKHeX.WinForms/Subforms/PKM Editors/BatchEditor.cs index 92eea3fcc..6d8b56989 100644 --- a/PKHeX.WinForms/Subforms/PKM Editors/BatchEditor.cs +++ b/PKHeX.WinForms/Subforms/PKM Editors/BatchEditor.cs @@ -162,7 +162,7 @@ private void RunBackgroundWorker() private void RunBatchEdit(StringInstructionSet[] sets, string source, string destination) { editor = new Core.BatchEditor(); - bool finished = false; // hack cuz DoWork event isn't cleared after completion + bool finished = false, displayed = false; // hack cuz DoWork event isn't cleared after completion b.DoWork += (sender, e) => { if (finished) @@ -179,7 +179,8 @@ private void RunBatchEdit(StringInstructionSet[] sets, string source, string des b.RunWorkerCompleted += (sender, e) => { string result = editor.GetEditorResults(sets); - WinFormsUtil.Alert(result); + if (!displayed) WinFormsUtil.Alert(result); + displayed = true; FLP_RB.Enabled = RTB_Instructions.Enabled = B_Go.Enabled = true; SetupProgressBar(0); };