Fixed: 'Save into' would detect non-map lumps with the same name as maps and ask if you want to save over...

This commit is contained in:
ZZYZX 2017-02-14 17:48:31 +02:00 committed by spherallic
parent 9054d07b9f
commit 7cb80cf9f2

View file

@ -905,7 +905,7 @@ namespace CodeImp.DoomBuilder
if(purpose == SavePurpose.IntoFile)
{
WAD wad = new WAD(newfilepathname, true);
int mapindex = wad.FindLumpIndex(origmapname);
int mapindex = FindAndRemoveMap(wad, origmapname, false);
wad.Dispose();
if(mapindex != -1 && MessageBox.Show(General.MainWindow, "Target file already contains map '" + origmapname + "'\nDo you want to replace it?", "Map already exists!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)