From 1140b5b97370594c81b97c2f9aec0a0167ea8312 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 24 Feb 2016 17:43:44 +0000 Subject: [PATCH] Enhancement to Modify Account button in the Preferences window. Check for Dialog result in frmEditAccount, don't reload accounts if not needed to. If needed to reload accounts, also disable the account modify and account delete buttons as well. --- source/frmPreferences.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/frmPreferences.cpp b/source/frmPreferences.cpp index 9124004..01a4656 100644 --- a/source/frmPreferences.cpp +++ b/source/frmPreferences.cpp @@ -127,16 +127,24 @@ void frmPreferences::ModifyABAccount( wxCommandEvent& event ) frameEditAccount->LoadSettings(AccName); frameEditAccount->ShowModal(); + bool DialogResult = frameEditAccount->GetDialogResult(); + delete frameEditAccount; frameEditAccount = NULL; delete cfgfile; cfgfile = NULL; + if (DialogResult == false){ + return; + } + // Reload the account list in the preferences window. ReloadAccounts(); *ReloadAccountConfig = TRUE; - + btnAccountModify->Enable(FALSE); + btnAccountDelete->Enable(FALSE); + } void frmPreferences::DeleteABAccount( wxCommandEvent& event ) -- 2.39.5