summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRahix <rahix@rahix.de>2020-05-12 23:11:06 +0200
committerJohn Wiegley <johnw@newartisans.com>2020-07-21 14:50:01 -0700
commitd29a7616fd85a28e7bb645887674f278553aa236 (patch)
tree0a9f7d576f831981d147e5966ca73f759d906e72 /src
parent3c7b8442c20f9a86e7077dc8049d97d1f2b33885 (diff)
downloadfork-ledger-d29a7616fd85a28e7bb645887674f278553aa236.tar.gz
fork-ledger-d29a7616fd85a28e7bb645887674f278553aa236.tar.bz2
fork-ledger-d29a7616fd85a28e7bb645887674f278553aa236.zip
Treat --depth like --collapse in register
Currently, collapsing is only done when both --depth and --collapse are present. This is very unintuitive and I have even stumbled over this myself while implenting the feature. Change --depth to behave just like --collapse in all cases (except that --depth has a parameter associated. --collapse defaults to 0 to retain its old behavior).
Diffstat (limited to 'src')
-rw-r--r--src/chain.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chain.cc b/src/chain.cc
index ef98a867..7ac7d593 100644
--- a/src/chain.cc
+++ b/src/chain.cc
@@ -193,7 +193,7 @@ post_handler_ptr chain_post_handlers(post_handler_ptr base_handler,
// collapse_posts causes xacts with multiple posts to appear as xacts
// with a subtotaled post for each commodity used.
- if (report.HANDLED(collapse)) {
+ if (report.HANDLED(collapse) || report.HANDLED(depth_)) {
unsigned short collapse_depth = 0;
if (report.HANDLED(depth_))
collapse_depth = lexical_cast<int>(report.HANDLER(depth_).str());