Fix a bug with accounts modification
This commit is contained in:
parent
9a5af57072
commit
a6218ac1cc
|
@ -322,13 +322,13 @@ void KissCount::NewUser(const wxString& name)
|
||||||
{
|
{
|
||||||
wxDateTime curDate;
|
wxDateTime curDate;
|
||||||
Account ac = {
|
Account ac = {
|
||||||
.id = wxT(""),
|
/*.id = */wxT(""),
|
||||||
.name = _("Account 1"),
|
/*.name = */_("Account 1"),
|
||||||
.number = wxT(""),
|
/*.number = */wxT(""),
|
||||||
.shared = false,
|
/*.shared = */false,
|
||||||
.blocked = false
|
/*.blocked = */false,
|
||||||
._default = true,
|
/*._default = */true,
|
||||||
.is_owner = true};
|
/*.is_owner = */true};
|
||||||
Category cat ;
|
Category cat ;
|
||||||
|
|
||||||
_db->NewUser(name);
|
_db->NewUser(name);
|
||||||
|
|
|
@ -364,8 +364,6 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
|
||||||
|
|
||||||
if (col == ACCOUNT_DEFAULT)
|
if (col == ACCOUNT_DEFAULT)
|
||||||
{
|
{
|
||||||
new_account.id = user->_accounts[row].id;
|
|
||||||
|
|
||||||
for (i=0; i<user->GetAccountsNumber(); i++)
|
for (i=0; i<user->GetAccountsNumber(); i++)
|
||||||
{
|
{
|
||||||
if (i != row)
|
if (i != row)
|
||||||
|
@ -379,8 +377,6 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_kiss->UpdateAccount(new_account);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,6 +385,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
|
||||||
{
|
{
|
||||||
new_account.id = user->_accounts[row].id;
|
new_account.id = user->_accounts[row].id;
|
||||||
new_account.shared = user->_accounts[row].shared;
|
new_account.shared = user->_accounts[row].shared;
|
||||||
|
new_account.is_owner = user->_accounts[row].is_owner;
|
||||||
|
|
||||||
if (col == ACCOUNT_DELETE)
|
if (col == ACCOUNT_DELETE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user