minor fixes

This commit is contained in:
AdAstra-LD 2021-01-29 17:31:46 +01:00
parent 3c723bec90
commit 7d2ec43c8d
3 changed files with 16 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 177 B

View File

@ -4672,20 +4672,23 @@ namespace DSPRE {
DisplayActiveEvents();
}
private void removeOverworldButton_Click(object sender, EventArgs e) {
if (overworldsListBox.Items.Count > 0) {
disableHandlers = true;
/* Remove overworld object from list and the corresponding entry in the ListBox */
int owNumber = overworldsListBox.SelectedIndex;
currentEventFile.overworlds.RemoveAt(owNumber);
overworldsListBox.Items.RemoveAt(owNumber);
FillOverworldsBox(); // Update ListBox
disableHandlers = false;
if (owNumber > 0)
overworldsListBox.SelectedIndex = owNumber - 1;
if (overworldsListBox.SelectedIndex < 0) {
return;
}
disableHandlers = true;
/* Remove overworld object from list and the corresponding entry in the ListBox */
int owNumber = overworldsListBox.SelectedIndex;
currentEventFile.overworlds.RemoveAt(owNumber);
overworldsListBox.Items.RemoveAt(owNumber);
FillOverworldsBox(); // Update ListBox
disableHandlers = false;
if (owNumber > 0)
overworldsListBox.SelectedIndex = owNumber - 1;
}
#endregion