From d29a7616fd85a28e7bb645887674f278553aa236 Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 12 May 2020 23:11:06 +0200 Subject: 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). --- src/chain.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(report.HANDLER(depth_).str()); -- cgit v1.2.3