Fix a bug in account creation
This commit is contained in:
parent
0975d12c86
commit
a4b01362de
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user