From: Steve Brokenshire Date: Wed, 24 Feb 2016 17:43:44 +0000 (+0000) Subject: Enhancement to Modify Account button in the Preferences window. X-Git-Tag: release-0.09~4 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=1140b5b97370594c81b97c2f9aec0a0167ea8312 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. --- 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 )