if (currentId != 0) {
changedIdentities.removeAll(currentId);
CertIdentity temp(currentId, this);
if (currentId != 0) {
changedIdentities.removeAll(currentId);
CertIdentity temp(currentId, this);
// we need to set the cert and key manually, as they aren't synced
CertIdentity *old = identities[currentId];
temp.setSslKey(old->sslKey());
temp.setSslCert(old->sslCert());
// we need to set the cert and key manually, as they aren't synced
CertIdentity *old = identities[currentId];
temp.setSslKey(old->sslKey());
temp.setSslCert(old->sslCert());
ui.identityEditor->saveToIdentity(&temp);
temp.setIdentityName(identities[currentId]->identityName());
if (temp != *Client::identity(currentId) || temp.isDirty())
ui.identityEditor->saveToIdentity(&temp);
temp.setIdentityName(identities[currentId]->identityName());
if (temp != *Client::identity(currentId) || temp.isDirty())