From 856a96c6da80415fe00ac9f2953bf4e8cba47e2d Mon Sep 17 00:00:00 2001 From: AdAstra-LD Date: Tue, 19 Jan 2021 15:45:48 +0100 Subject: [PATCH] removed useless helper function --- DS_Map/Main Window.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/DS_Map/Main Window.cs b/DS_Map/Main Window.cs index bcfce89..1330cf7 100644 --- a/DS_Map/Main Window.cs +++ b/DS_Map/Main Window.cs @@ -1291,12 +1291,11 @@ namespace DSPRE { if (disableHandlers) return; - int headerNumber = GetHeaderNumberFromListBoxName(); - currentHeader = LoadHeader(headerNumber); - - String nameDisplayedInListBox = headerListBox.SelectedItem.ToString(); int separatorPosition = nameDisplayedInListBox.IndexOf(headerNamesSeparator); + int headerNumber = Int32.Parse(nameDisplayedInListBox.Substring(0, separatorPosition)); + currentHeader = LoadHeader(headerNumber); + /* Setup controls for common fields across headers */ internalNameBox.Text = nameDisplayedInListBox.Substring(separatorPosition + headerNamesSeparator.Length); matrixUpDown.Value = currentHeader.matrix; @@ -1312,7 +1311,6 @@ namespace DSPRE { if (romInfo.gameVersion == "HG" || romInfo.gameVersion == "SS") areaSettingsComboBox.SelectedIndex = cameraComboBox.FindString("[" + currentHeader.areaSettings.ToString("D2")); - if (currentHeader.wildPokémon == romInfo.nullEncounterID) openWildEditorWithIdButton.Enabled = false; else @@ -1345,13 +1343,6 @@ namespace DSPRE { break; } } - - private int GetHeaderNumberFromListBoxName() { - String nameDisplayedInListBox = headerListBox.SelectedItem.ToString(); - int separatorPosition = nameDisplayedInListBox.IndexOf(headerNamesSeparator); - return Int32.Parse(nameDisplayedInListBox.Substring(0, separatorPosition)); - } - private void refreshFlags() { int i = 7; disableHandlers = true;