Fix a bug in account creation

This commit is contained in:
Grégory Soutadé 2011-01-16 20:50:48 +01:00
parent 0975d12c86
commit a4b01362de

View File

@ -238,6 +238,12 @@ void PreferencesPanel::AddAccount(int line, Account ac)
_accountsGrid->SetReadOnly(line, ACCOUNT_DEFAULT, true);
_accountsGrid->SetReadOnly(line, ACCOUNT_BLOCKED, true);
}
else
{
_accountsGrid->SetReadOnly(line, ACCOUNT_DEFAULT, false);
_accountsGrid->SetReadOnly(line, ACCOUNT_BLOCKED, false);
_accountsGrid->SetReadOnly(line, ACCOUNT_DELETE, false);
}
}
else
{
@ -488,6 +494,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
new_account.shared = false;
new_account.blocked = false;
new_account.is_owner = true;
AddAccount(row, new_account);
_kiss->AddAccount(new_account);
@ -495,7 +502,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
_accountsGrid->AppendRows();
new_account.id = wxT("0");
AddAccount(row, new_account);
AddAccount(row+1, new_account);
}
_wxUI->Layout();