mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdChart: Calculating indent earlier and reusing the value
This commit is contained in:
parent
b74cfa4704
commit
99d579f65f
1 changed files with 1 additions and 6 deletions
|
@ -173,11 +173,6 @@ int renderChart (
|
||||||
<< labelDay
|
<< labelDay
|
||||||
<< lines[0].str ();
|
<< lines[0].str ();
|
||||||
|
|
||||||
int indent = (rules.getBoolean ("reports." + type + ".month") ? 4 : 0) +
|
|
||||||
(rules.getBoolean ("reports." + type + ".week") ? 4 : 0) +
|
|
||||||
(rules.getBoolean ("reports." + type + ".day") ? 3 : 0) +
|
|
||||||
(rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0);
|
|
||||||
|
|
||||||
if (lines.size () > 1)
|
if (lines.size () > 1)
|
||||||
for (unsigned int i = 1; i < lines.size (); ++i)
|
for (unsigned int i = 1; i < lines.size (); ++i)
|
||||||
std::cout << "\n"
|
std::cout << "\n"
|
||||||
|
@ -193,7 +188,7 @@ int renderChart (
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << renderSubTotal (type, rules, first_hour, last_hour, total_work)
|
std::cout << renderSubTotal (type, rules, first_hour, last_hour, total_work)
|
||||||
<< renderSummary (type, rules, " ", filter, exclusions, tracked);
|
<< renderSummary (type, rules, std::string (indent, ' '), filter, exclusions, tracked, blank);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue