Clearing jobs create new lists instead of clearing

Other users may have grabbed them and then have the content swiped out from under them
This commit is contained in:
Justin Swanson 2020-04-12 13:55:59 -05:00
parent db293b6808
commit e85f6b54dd
2 changed files with 8 additions and 8 deletions

View File

@ -42,9 +42,9 @@ namespace Wabbajack.Lib
public bool IgnoreMissingFiles { get; set; }
public readonly List<Archive> SelectedArchives = new List<Archive>();
public readonly List<Directive> InstallDirectives = new List<Directive>();
public readonly List<RawSourceFile> AllFiles = new List<RawSourceFile>();
public List<Archive> SelectedArchives { get; protected set; } = new List<Archive>();
public List<Directive> InstallDirectives { get; protected set; } = new List<Directive>();
public List<RawSourceFile> AllFiles { get; protected set; } = new List<RawSourceFile>();
public ModList ModList = new ModList();
public List<IndexedArchive> IndexedArchives = new List<IndexedArchive>();

View File

@ -53,7 +53,7 @@ namespace Wabbajack.Lib
public AbsolutePath MO2ProfileDir => MO2Folder.Combine("profiles", MO2Profile);
public ConcurrentBag<Directive> ExtraFiles { get; } = new ConcurrentBag<Directive>();
public ConcurrentBag<Directive> ExtraFiles { get; private set; } = new ConcurrentBag<Directive>();
public Dictionary<AbsolutePath, dynamic> ModInis { get; } = new Dictionary<AbsolutePath, dynamic>();
public HashSet<string> SelectedProfiles { get; set; } = new HashSet<string>();
@ -409,10 +409,10 @@ namespace Wabbajack.Lib
/// </summary>
private void ResetMembers()
{
AllFiles.Clear();
InstallDirectives.Clear();
SelectedArchives.Clear();
ExtraFiles.Clear();
AllFiles = new List<RawSourceFile>();
InstallDirectives = new List<Directive>();
SelectedArchives = new List<Archive>();
ExtraFiles = new ConcurrentBag<Directive>();
}
/// <summary>