A map was not saved properly when user saved it right after changing map format.

Removed some unused "using" directives.
This commit is contained in:
MaxED 2013-05-31 13:57:49 +00:00
parent c67331eaf6
commit 9d985393ee
4 changed files with 13 additions and 19 deletions

View file

@ -1618,17 +1618,14 @@ namespace CodeImp.DoomBuilder {
General.Plugins.MapReconfigure();
//mxd. Update linedef color presets and flags if required
if(General.Map != null && General.Map.Map != null) {
if(oldFormatInterface == "UniversalMapSetIO" && config.FormatInterface != "UniversalMapSetIO") {
foreach(Linedef l in General.Map.Map.Linedefs) l.TranslateFromUDMF();
foreach(Thing t in General.Map.Map.Things) t.TranslateFromUDMF();
} else if(oldFormatInterface != "UniversalMapSetIO" && config.FormatInterface == "UniversalMapSetIO") {
foreach(Linedef l in General.Map.Map.Linedefs) l.TranslateToUDMF();
foreach(Thing t in General.Map.Map.Things) t.TranslateToUDMF();
}
General.Map.Map.UpdateCustomLinedefColors();
if(oldFormatInterface == "UniversalMapSetIO" && config.FormatInterface != "UniversalMapSetIO") {
foreach(Linedef l in General.Map.Map.Linedefs) l.TranslateFromUDMF();
foreach(Thing t in General.Map.Map.Things) t.TranslateFromUDMF();
} else if(oldFormatInterface != "UniversalMapSetIO" && config.FormatInterface == "UniversalMapSetIO") {
foreach(Linedef l in General.Map.Map.Linedefs) l.TranslateToUDMF();
foreach(Thing t in General.Map.Map.Things) t.TranslateToUDMF();
}
General.Map.Map.UpdateCustomLinedefColors();
// Update interface
General.MainWindow.SetupInterface();

View file

@ -183,6 +183,10 @@ namespace CodeImp.DoomBuilder.Windows
}
}
return;
}
else
{ //mxd. Otherwise map data won't be saved if a user decides to save the map right after converting to new map format
General.Map.IsChanged = true;
}
}
}

View file

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Map;
using System.Threading;
namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks

View file

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using System.Drawing;