mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-05-31 17:11:47 +00:00
A slightly better implementation of previous commit...
This commit is contained in:
parent
720b4e01ec
commit
27d021887e
2 changed files with 5 additions and 5 deletions
|
@ -1194,11 +1194,6 @@ namespace CodeImp.DoomBuilder
|
||||||
// Open map options dialog
|
// Open map options dialog
|
||||||
ChangeMapForm changemapwindow = new ChangeMapForm(map.FilePathName, map.Options);
|
ChangeMapForm changemapwindow = new ChangeMapForm(map.FilePathName, map.Options);
|
||||||
if(changemapwindow.ShowDialog(mainwindow) != DialogResult.OK) return;
|
if(changemapwindow.ShowDialog(mainwindow) != DialogResult.OK) return;
|
||||||
if (map.Options.CurrentName == changemapwindow.Options.CurrentName)
|
|
||||||
{
|
|
||||||
mainwindow.DisplayStatus(StatusType.Info, "Map '" + map.Options.CurrentName + "' is already loaded!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display status
|
// Display status
|
||||||
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map '" + changemapwindow.Options.CurrentName + "'...");
|
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map '" + changemapwindow.Options.CurrentName + "'...");
|
||||||
|
|
|
@ -142,6 +142,11 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
General.ShowWarningMessage("Please select a map first!", MessageBoxButtons.OK);
|
General.ShowWarningMessage("Please select a map first!", MessageBoxButtons.OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mapslist.SelectedItems[0].Text == options.LevelName)
|
||||||
|
{
|
||||||
|
General.ShowWarningMessage("Map '" + options.LevelName + "' is already loaded!", MessageBoxButtons.OK);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
options.CurrentName = mapslist.SelectedItems[0].Text;
|
options.CurrentName = mapslist.SelectedItems[0].Text;
|
||||||
options.PreviousName = string.Empty;
|
options.PreviousName = string.Empty;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue