mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Fixed, "OpenMapInCurrentWad" action: we should not switch to already opened map.
Fixed, Open Map form: a warning is now displayed when no map is selected when accepting the form.
This commit is contained in:
parent
f986f5c98d
commit
720b4e01ec
2 changed files with 11 additions and 0 deletions
|
@ -1194,6 +1194,11 @@ namespace CodeImp.DoomBuilder
|
|||
// Open map options dialog
|
||||
ChangeMapForm changemapwindow = new ChangeMapForm(map.FilePathName, map.Options);
|
||||
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
|
||||
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map '" + changemapwindow.Options.CurrentName + "'...");
|
||||
|
|
|
@ -137,6 +137,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
}
|
||||
|
||||
private void apply_Click(object sender, EventArgs e) {
|
||||
if (mapslist.SelectedItems.Count < 1)
|
||||
{
|
||||
General.ShowWarningMessage("Please select a map first!", MessageBoxButtons.OK);
|
||||
return;
|
||||
}
|
||||
|
||||
options.CurrentName = mapslist.SelectedItems[0].Text;
|
||||
options.PreviousName = string.Empty;
|
||||
|
||||
|
|
Loading…
Reference in a new issue