mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 20:16:48 -05:00
Reorder open folder logic
Close() still finished executing the method Closes #2076
This commit is contained in:
@@ -104,12 +104,13 @@ private void AddButton(string name, string path)
|
||||
button.Enabled = new DirectoryInfo(path).Exists;
|
||||
button.Click += (s, e) =>
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Process.Start("explorer.exe", path);
|
||||
Close();
|
||||
WinFormsUtil.Alert(MsgFolderNotFound, path);
|
||||
return;
|
||||
}
|
||||
WinFormsUtil.Alert(MsgFolderNotFound, path);
|
||||
Process.Start("explorer.exe", path);
|
||||
Close();
|
||||
};
|
||||
FLP_Buttons.Controls.Add(button);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user