Summary: | Accounts view is not updated when account data changes | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Thomas Baumgart <tbaumgart> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | critical | ||
Priority: | HI | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
This patch fixed the problem but should receive a bit of review before committing it right before the release
Updated the patch to handle the changing of the 'Favorite' status of the account |
Description
Thomas Baumgart
2011-08-05 17:36:34 UTC
Created attachment 62582 [details]
This patch fixed the problem but should receive a bit of review before committing it right before the release
The bug only affect accounts which are marked as 'Favorite'.
This happens because there are actually 2 items for such accounts in the accounts model. In the future the 'Favorites' account grouping should be done in a proxy (as if that would be easier :):)).
The fix consist in internal API change. The function which was used to retrieve the account item by id (when the parent item was not known) now always returns the account which is not the child of the 'Favorite accounts' item.
In the client code of this API in all the relevant places when an account is favorite the corresponding item is also updated explicitly.
Thoughts?
Created attachment 62584 [details]
Updated the patch to handle the changing of the 'Favorite' status of the account
SVN commit 1245224 by conet: BUG: 279470 Update all the model items even if an account is favorite in which case there are two items which correspond to the same account. This is another case of account data change that affects the model layout that was not handled correctly. And extra fix of the AccountsFilterProxyModel::removeAccountType which now really removes the account type even if the type is present in the list more then once (m_typeList should really be a set). M +28 -8 accountsmodel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1245224 |