if (boolUnsupportedAccount == true){
- wxMessageBox(_("Cannot make changes to a contact from an unsupported account type."), _("Unsupported account"), wxICON_ERROR);
+ wxMessageBox(_("Cannot make changes to a contact from an unsupported account type."), _("Unsupported account"), wxICON_ERROR);
+ saveSuccess = false;
return;
}
if (cmbDisplayAsValue.IsEmpty()){
wxMessageBox(_("Display As value cannot be left blank."), _("Display As value empty"), wxICON_ERROR);
+ saveSuccess = false;
return;
}
event2.SetClientData(ucd);
wxPostEvent(MainPtr, event2);
}
+
+ saveSuccess = true;
}
wxCommandEvent NullEvent;
this->SaveContact(NullEvent);
- this->Close();
+ if (saveSuccess)
+ {
+ this->Close();
+ }
}
\ No newline at end of file