From 30a5d875f008cdb1ae73eab3922eef308ecfcd6c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 27 Feb 2006 10:05:36 +0000 Subject: (config_t::regexps_to_predicate): Don't set the display predicate to show only matching accounts when the --related flag is in use (which was effectively masking out the whole point of using --related with balance reports). --- config.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/config.cc b/config.cc index 397236b4..3344c708 100644 --- a/config.cc +++ b/config.cc @@ -130,16 +130,21 @@ config_t::regexps_to_predicate(const std::string& command, } if (i != 1 && command == "b" && account_regexp) { - if (! display_predicate.empty()) - display_predicate += "&"; - else if (! show_empty) - display_predicate += "T&"; - - if (add_predicate == 2) - display_predicate += "//"; - display_predicate += "/(?:"; - display_predicate += regexps[i]; - display_predicate += ")/"; + if (! show_related && ! show_all_related) { + if (! display_predicate.empty()) + display_predicate += "&"; + else if (! show_empty) + display_predicate += "T&"; + + if (add_predicate == 2) + display_predicate += "//"; + display_predicate += "/(?:"; + display_predicate += regexps[i]; + display_predicate += ")/"; + } + else if (! show_empty) { + display_predicate += "T"; + } } if (! account_regexp) -- cgit v1.2.3