From 59aefb5a3b0df32b1008bb5f5008daf879f5ff5f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Feb 2009 05:18:46 -0400 Subject: Inverted the default display mode for balance reports. Use -n to collapse them, as this fits better with what -n does for register reports. --- src/global.cc | 2 -- src/report.h | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/global.cc b/src/global.cc index f5b9b0b4..a8d288cc 100644 --- a/src/global.cc +++ b/src/global.cc @@ -387,8 +387,6 @@ void global_scope_t::normalize_report_options(const string& verb) if (verb[0] == 'b') { if (! rep.HANDLED(empty)) rep.append_display_predicate("total"); - if (! rep.HANDLED(subtotal)) - rep.append_display_predicate("depth<=1"); } else if (verb == "equity") { // jww (2008-08-14): ??? diff --git a/src/report.h b/src/report.h index 1aff9212..8bcd6b57 100644 --- a/src/report.h +++ b/src/report.h @@ -219,7 +219,12 @@ public: OPTION(report_t, cache_); OPTION(report_t, cleared); // -C OPTION(report_t, code_as_payee); - OPTION(report_t, collapse); // -n + + OPTION_(report_t, collapse, DO() { // -n + // Make sure that balance reports are collapsed too + parent->append_display_predicate("depth<=1"); + }); + OPTION(report_t, comm_as_payee); // -x OPTION(report_t, cost); OPTION(report_t, csv_format_); -- cgit v1.2.3