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.
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 )