mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Delay d&d file deletion
Gives web browser programs enough time to acquire the data since the file isn't being moved to a location on the user's local storage.
This commit is contained in:
parent
250fc15f14
commit
109bd291f6
1 changed files with 8 additions and 1 deletions
|
@ -3229,8 +3229,15 @@ namespace PKHeX
|
|||
}
|
||||
catch (ArgumentException x)
|
||||
{ Util.Error("Drag & Drop Error:", x.ToString()); }
|
||||
File.Delete(newfile);
|
||||
pkm_from_offset = 0;
|
||||
|
||||
// Browser apps need time to load data since the file isn't moved to a location on the user's local storage.
|
||||
// Tested 10ms -> too quick, 100ms was fine. 500ms should be safe?
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
File.Delete(newfile);
|
||||
}).Start();
|
||||
}
|
||||
private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue