From b1c8b3e67f41e952f7c2c841403ec4fad1314b40 Mon Sep 17 00:00:00 2001 From: AthenaADP Date: Mon, 1 Oct 2018 21:13:40 +0800 Subject: [PATCH] Fixed Clear Settings not properly clearing skill lists --- Form1.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Form1.h b/Form1.h index 11c46dd..a2b59ed 100644 --- a/Form1.h +++ b/Form1.h @@ -3314,6 +3314,11 @@ namespace MHGUASS System::Void mnuClearSettings_Click( System::Object^ sender, System::EventArgs^ e ) { cmbSort->SelectedIndex = 0; + + SuspendUpdate::Suspend( tabHunterType ); + + lock_skills = true; + for each( ComboBox^ cb in bSkills ) { cb->SelectedIndex = -1; @@ -3322,14 +3327,27 @@ namespace MHGUASS { cb->SelectedIndex = -1; } + + lock_skills = false; + for each( ComboBox^ cb in bSkillFilters ) { - cb->SelectedIndex = 0; + if( cb->SelectedIndex == 0 ) + cmbSkillFilter_SelectedIndexChanged( cb, bSkills, bSkillFilters, bIndexMaps ); + else + cb->SelectedIndex = 0; } for each( ComboBox^ cb in gSkillFilters ) { + if( cb->SelectedIndex == 0 ) + cmbSkillFilter_SelectedIndexChanged( cb, gSkills, gSkillFilters, gIndexMaps ); + else cb->SelectedIndex = 0; } + + SuspendUpdate::Resume( tabHunterType ); + + OptionsChanged( sender, e ); } System::Void nudHR_ValueChanged(System::Object^ sender, System::EventArgs^ e)