From 5ec85538d9690634a2b1ee7c422e109700eb0627 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 12 Jun 2010 21:33:41 -0400 Subject: account_t::add_post resets family_details.gathered --- src/account.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/account.cc') 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()); -- cgit v1.2.3