TI-70: Timew starts a new interval even if a current interval contains the same set of tags

- Thanks to Thomas Babej.
This commit is contained in:
Paul Beckingham 2017-04-04 18:43:33 -04:00
parent aad36da44f
commit c283c9d2c4
3 changed files with 12 additions and 1 deletions

View file

@ -45,6 +45,16 @@ int CmdStart (
auto latest = getLatestInterval (database);
if (latest.range.is_open ())
{
// If the new interval tags match those of the currnetly open interval, then
// do nothing - the tags are already being tracked.
if (latest.tags () == filter.tags ())
{
if (rules.getBoolean ("verbose"))
std::cout << intervalSummarize (database, rules, latest);
return 0;
}
// Stop it, at the given start time, if applicable.
Interval modified {latest};
if (filter.range.start.toEpoch () != 0)