ui: reg: ensure T always has a visible effect

This commit is contained in:
Simon Michael 2018-10-15 18:31:26 -07:00
parent 1c3233cc0f
commit 52ee10bd87

View File

@ -188,7 +188,7 @@ rsDraw UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}
where where
ishistorical = balancetype_ ropts == HistoricalBalance ishistorical = balancetype_ ropts == HistoricalBalance
inclusive = tree_ ropts || rsForceInclusive -- inclusive = tree_ ropts || rsForceInclusive
toplabel = toplabel =
withAttr ("border" <> "bold") (str $ T.unpack $ replaceHiddenAccountsNameWith "All" rsAccount) 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" then selectedstr "historical" <+> str "/period"
else str "historical/" <+> selectedstr "period") else str "historical/" <+> selectedstr "period")
,("T" ,("T"
,if inclusive -- rsForceInclusive may override, but use tree_ here to ensure a visible toggle effect
,if tree_ ropts
then str "flat/" <+> selectedstr "tree" then str "flat/" <+> selectedstr "tree"
else selectedstr "flat" <+> str "/tree") else selectedstr "flat" <+> str "/tree")
,("F" ,("F"