Skip to content

Commit

Permalink
Fixed out-of-context nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
marth8880 committed Aug 8, 2018
1 parent ea836c4 commit 916e7cf
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ZeroWorldStats/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ private void PopulateModeList()
try
{
ReqChunk reqChunk = ReqParser.ParseChunk(worldReqFilePath, "lvl");
// Add the "[Base]" mode to the list
worldModes.Clear();
worldModes.Add(DROPDOWN_MODES_BASE, DROPDOWN_MODES_BASE);

// Get the existing mrq files and merge the returned dictionary with the worldModes dictionary
var resolvedFiles = reqChunk.ResolveContentsAsFiles(worldDirectory, ".mrq", true);
resolvedFiles.ToList().ForEach(x => worldModes[x.Key] = x.Value);

// Add the modes to the dropdown
dd_ModeMrq.Items.Clear();
dd_ModeMrq.Items.AddRange(worldModes.Keys.ToArray());
}
catch (FileNotFoundException ex)
{
Expand All @@ -180,17 +191,6 @@ private void PopulateModeList()
Trace.WriteLine(ex.Message);
throw;
}
// Add the "[Base]" mode to the list
worldModes.Clear();
worldModes.Add(DROPDOWN_MODES_BASE, DROPDOWN_MODES_BASE);

// Get the existing mrq files and merge the returned dictionary with the worldModes dictionary
var resolvedFiles = reqChunk.ResolveContentsAsFiles(worldDirectory, ".mrq", true);
resolvedFiles.ToList().ForEach(x => worldModes[x.Key] = x.Value);

// Add the modes to the dropdown
dd_ModeMrq.Items.Clear();
dd_ModeMrq.Items.AddRange(worldModes.Keys.ToArray());
}
catch (ArgumentNullException ex)
{
Expand Down

0 comments on commit 916e7cf

Please sign in to comment.