Skip to content

Commit

Permalink
Correcting behavior after loading error.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Mar 8, 2015
1 parent 2e3a10b commit da1a34e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SonLVL/MainForm.cs
Expand Up @@ -466,6 +466,7 @@ private void LevelToolStripMenuItem_Clicked(object sender, EventArgs e)
#if !DEBUG
loadingAnimation1.BringToFront();
loadingAnimation1.Show();
initerror = null;
backgroundLevelLoader.RunWorkerAsync(((ToolStripMenuItem)sender).Tag);
#else
backgroundLevelLoader_DoWork(null, new DoWorkEventArgs(((ToolStripMenuItem)sender).Tag));
Expand Down Expand Up @@ -511,7 +512,9 @@ private void backgroundLevelLoader_RunWorkerCompleted(object sender, RunWorkerCo
System.IO.File.WriteAllLines("SonLVL.log", LogFile.ToArray());
using (ErrorDialog ed = new ErrorDialog(initerror.GetType().Name + ": " + initerror.Message + "\nLog file has been saved to " + System.IO.Path.Combine(Environment.CurrentDirectory, "SonLVL.log") + ".\nSend this to MainMemory on the Sonic Retro forums.", true))
if (ed.ShowDialog(this) == System.Windows.Forms.DialogResult.Cancel) Close();
Text = "SonLVL - " + LevelData.Game.EngineVersion.ToString();
Enabled = true;
loadingAnimation1.Hide();
return;
}
Log("Load completed.");
Expand Down

0 comments on commit da1a34e

Please sign in to comment.