fixed #1263 - don't trash the current directory on exporting a minimap
This commit is contained in:
@@ -419,11 +419,15 @@ namespace OpenRA.Editor
|
||||
|
||||
void ExportMinimap(object sender, EventArgs e)
|
||||
{
|
||||
saveFileDialog.InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps");
|
||||
saveFileDialog.FileName = Path.ChangeExtension(loadedMapName, ".png");
|
||||
|
||||
if (DialogResult.OK == saveFileDialog.ShowDialog())
|
||||
pmMiniMap.Image.Save(saveFileDialog.FileName);
|
||||
using( var sfd = new SaveFileDialog() {
|
||||
InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps"),
|
||||
DefaultExt = "*.png",
|
||||
Filter = "PNG Image (*.png)|*.png",
|
||||
Title = "Export Minimap to PNG",
|
||||
FileName = Path.ChangeExtension(loadedMapName, ".png"),
|
||||
RestoreDirectory = true } )
|
||||
if (DialogResult.OK == sfd.ShowDialog())
|
||||
pmMiniMap.Image.Save(sfd.FileName);
|
||||
}
|
||||
|
||||
void ShowActorNamesClicked(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user