summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 21:33:41 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 01:03:48 -0400
commit5ec85538d9690634a2b1ee7c422e109700eb0627 (patch)
tree19d8b013cd30e438ca3c86fb9d7344fb56d1f960 /src/account.cc
parent15bf3ed39ed24bc55abc624757a1a943ebabb085 (diff)
downloadfork-ledger-5ec85538d9690634a2b1ee7c422e109700eb0627.tar.gz
fork-ledger-5ec85538d9690634a2b1ee7c422e109700eb0627.tar.bz2
fork-ledger-5ec85538d9690634a2b1ee7c422e109700eb0627.zip
account_t::add_post resets family_details.gathered
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/account.cc b/src/account.cc
index 710cabe1..33b1ebab 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -122,6 +122,20 @@ account_t * account_t::find_account_re(const string& regexp)
return find_account_re_(this, mask_t(regexp));
}
+void account_t::add_post(post_t * post)
+{
+ posts.push_back(post);
+
+ // Adding a new post changes the possible totals that may have been
+ // computed before.
+ if (xdata_) {
+ xdata_->self_details.gathered = false;
+ xdata_->self_details.calculated = false;
+ xdata_->family_details.gathered = false;
+ xdata_->family_details.calculated = false;
+ }
+}
+
bool account_t::remove_post(post_t * post)
{
assert(! posts.empty());