mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Enable auto-bak loading for db
previously was only for debug builds; loads in like 2 seconds on my computer for >70k pkm from >250 backups if enough people complain I can add it as a setting instead
This commit is contained in:
parent
dcf2b5fd9c
commit
97f0f418d6
1 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#define LOADALL
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -157,7 +158,7 @@ namespace PKHeX.WinForms
|
|||
var pk = Results[index];
|
||||
string path = pk.Identifier;
|
||||
|
||||
#if DEBUG
|
||||
#if LOADALL
|
||||
if (path.StartsWith(EXTERNAL_SAV))
|
||||
{
|
||||
WinFormsUtil.Alert("Can't delete from a backup save.");
|
||||
|
@ -338,7 +339,7 @@ namespace PKHeX.WinForms
|
|||
dbTemp.Add(pk);
|
||||
});
|
||||
|
||||
#if DEBUG
|
||||
#if LOADALL
|
||||
if (SaveUtil.GetSavesFromFolder(Main.BackupPath, false, out IEnumerable<string> result))
|
||||
{
|
||||
Parallel.ForEach(result, file =>
|
||||
|
@ -405,7 +406,7 @@ namespace PKHeX.WinForms
|
|||
if (!Menu_SearchDatabase.Checked)
|
||||
{
|
||||
res = res.Where(pk => !pk.Identifier.StartsWith(DatabasePath + Path.DirectorySeparatorChar, StringComparison.Ordinal));
|
||||
#if DEBUG
|
||||
#if LOADALL
|
||||
res = res.Where(pk => !pk.Identifier.StartsWith(EXTERNAL_SAV, StringComparison.Ordinal));
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue