From 52ee10bd875f343ac67a7675ecf3d4ee3c53ee3a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 15 Oct 2018 18:31:26 -0700 Subject: [PATCH] ui: reg: ensure T always has a visible effect --- hledger-ui/Hledger/UI/RegisterScreen.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hledger-ui/Hledger/UI/RegisterScreen.hs b/hledger-ui/Hledger/UI/RegisterScreen.hs index a418ae799..609a5be51 100644 --- a/hledger-ui/Hledger/UI/RegisterScreen.hs +++ b/hledger-ui/Hledger/UI/RegisterScreen.hs @@ -188,7 +188,7 @@ rsDraw UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} where ishistorical = balancetype_ ropts == HistoricalBalance - inclusive = tree_ ropts || rsForceInclusive + -- inclusive = tree_ ropts || rsForceInclusive toplabel = withAttr ("border" <> "bold") (str $ T.unpack $ replaceHiddenAccountsNameWith "All" rsAccount) @@ -236,7 +236,8 @@ rsDraw UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} then selectedstr "historical" <+> str "/period" else str "historical/" <+> selectedstr "period") ,("T" - ,if inclusive + -- rsForceInclusive may override, but use tree_ here to ensure a visible toggle effect + ,if tree_ ropts then str "flat/" <+> selectedstr "tree" else selectedstr "flat" <+> str "/tree") ,("F"