mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 09:07:52 -05:00
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.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user