fix real-ra map importer when map isn't in game root

This commit is contained in:
Bob
2010-09-21 00:57:31 +12:00
parent 64d700cd70
commit e390cf8ab0

View File

@@ -349,9 +349,11 @@ namespace OpenRA.Editor
void ImportLegacyMapClicked(object sender, EventArgs e) void ImportLegacyMapClicked(object sender, EventArgs e)
{ {
var currentDirectory = Directory.GetCurrentDirectory();
using (var ofd = new OpenFileDialog { Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" }) using (var ofd = new OpenFileDialog { Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" })
if (DialogResult.OK == ofd.ShowDialog()) if (DialogResult.OK == ofd.ShowDialog())
{ {
Directory.SetCurrentDirectory( currentDirectory );
/* massive hack: we should be able to call NewMap() with the imported Map object, /* massive hack: we should be able to call NewMap() with the imported Map object,
* but something's not right internally in it, unless loaded via the real maploader */ * but something's not right internally in it, unless loaded via the real maploader */