summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-16 21:23:12 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-16 21:23:12 -0400
commite6934fbd3c297311e4f0616e1a550f78ef4406f7 (patch)
tree829787bb209207b257428ccbb71fd9949d9c21bb /src/output.cc
parente3b44038b389461162e4920a26b09c0df9cf83b6 (diff)
downloadfork-ledger-e6934fbd3c297311e4f0616e1a550f78ef4406f7.tar.gz
fork-ledger-e6934fbd3c297311e4f0616e1a550f78ef4406f7.tar.bz2
fork-ledger-e6934fbd3c297311e4f0616e1a550f78ef4406f7.zip
Removed an unused extended account xdata flag
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/output.cc b/src/output.cc
index b9af9a27..cd28e58c 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -242,14 +242,11 @@ void format_accounts::flush()
void format_accounts::operator()(account_t& account)
{
- if (display_account(account)) {
- if (! account.parent) {
- account.xdata().add_flags(ACCOUNT_EXT_TO_DISPLAY);
- } else {
- bind_scope_t bound_scope(report, account);
- format.format(report.output_stream, bound_scope);
- account.xdata().add_flags(ACCOUNT_EXT_DISPLAYED);
- }
+ // Never display the top-most account (the "root", or master, account)
+ if (account.parent && display_account(account)) {
+ bind_scope_t bound_scope(report, account);
+ format.format(report.output_stream, bound_scope);
+ account.xdata().add_flags(ACCOUNT_EXT_DISPLAYED);
}
}
@@ -265,6 +262,8 @@ bool format_accounts::disp_subaccounts_p(account_t& account,
to_show = NULL;
+ bind_scope_t account_scope(report, account);
+
foreach (accounts_map::value_type pair, account.accounts) {
if (! should_display(*pair.second))
continue;
@@ -273,7 +272,6 @@ bool format_accounts::disp_subaccounts_p(account_t& account,
call_scope_t args(bound_scope);
result = report.fn_total_expr(args);
if (! computed) {
- bind_scope_t account_scope(report, account);
call_scope_t args(account_scope);
acct_total = report.fn_total_expr(args);
computed = true;