From a6218ac1ccc10697ec61c8185cd44c866f0aade3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Mon, 15 Nov 2010 21:12:31 +0100 Subject: [PATCH] Fix a bug with accounts modification --- src/controller/KissCount.cpp | 14 +++++++------- src/view/PreferencesPanel.cpp | 5 +---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/controller/KissCount.cpp b/src/controller/KissCount.cpp index becb72a..644f5e2 100644 --- a/src/controller/KissCount.cpp +++ b/src/controller/KissCount.cpp @@ -322,13 +322,13 @@ void KissCount::NewUser(const wxString& name) { wxDateTime curDate; Account ac = { - .id = wxT(""), - .name = _("Account 1"), - .number = wxT(""), - .shared = false, - .blocked = false - ._default = true, - .is_owner = true}; + /*.id = */wxT(""), + /*.name = */_("Account 1"), + /*.number = */wxT(""), + /*.shared = */false, + /*.blocked = */false, + /*._default = */true, + /*.is_owner = */true}; Category cat ; _db->NewUser(name); diff --git a/src/view/PreferencesPanel.cpp b/src/view/PreferencesPanel.cpp index 6f85fdf..91060aa 100644 --- a/src/view/PreferencesPanel.cpp +++ b/src/view/PreferencesPanel.cpp @@ -364,8 +364,6 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) if (col == ACCOUNT_DEFAULT) { - new_account.id = user->_accounts[row].id; - for (i=0; iGetAccountsNumber(); i++) { if (i != row) @@ -379,8 +377,6 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) break; } } - - _kiss->UpdateAccount(new_account); } } @@ -389,6 +385,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) { new_account.id = user->_accounts[row].id; new_account.shared = user->_accounts[row].shared; + new_account.is_owner = user->_accounts[row].is_owner; if (col == ACCOUNT_DELETE) {