We should save LastUsedConfigName only when creating a new map...

This commit is contained in:
MaxED 2013-03-21 11:28:50 +00:00
parent 46818663f3
commit 0e7a74158f

View file

@ -120,12 +120,14 @@ namespace CodeImp.DoomBuilder.Windows
// Collect information
ConfigurationInfo configinfo = General.Configs[config.SelectedIndex];
DataLocationList locations = datalocations.GetResources();
General.Settings.LastUsedConfigName = configinfo.Name;
// When making a new map, check if we should warn the user for missing resources
if(newmap && (locations.Count == 0) && (configinfo.Resources.Count == 0))
if(newmap)
{
if(MessageBox.Show(this, "You are about to make a map without selecting any resources. Textures, flats and " +
General.Settings.LastUsedConfigName = configinfo.Name; //mxd
if((locations.Count == 0) && (configinfo.Resources.Count == 0) &&
MessageBox.Show(this, "You are about to make a map without selecting any resources. Textures, flats and " +
"sprites may not be shown correctly or may not show up at all. Do you want to continue?", Application.ProductName,
MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No)
{