mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: Adds IDs to intervals even when there are no exclusions
This commit is contained in:
parent
df15141768
commit
803632793f
1 changed files with 10 additions and 6 deletions
10
src/data.cpp
10
src/data.cpp
|
@ -616,13 +616,17 @@ std::vector <Interval> getTracked (
|
|||
// Get the set of expanded exclusions that overlap the range defined by the
|
||||
// timeline.
|
||||
auto exclusions = getAllExclusions (rules, filter.range);
|
||||
if (! exclusions.size ())
|
||||
return inclusions;
|
||||
|
||||
std::vector <Interval> intervals;
|
||||
if (! exclusions.empty ())
|
||||
{
|
||||
for (auto& inclusion : inclusions)
|
||||
for (auto& interval : flatten (inclusion, exclusions))
|
||||
intervals.push_back (interval);
|
||||
}
|
||||
else
|
||||
{
|
||||
intervals = inclusions;
|
||||
}
|
||||
|
||||
// Assign an ID to each interval.
|
||||
for (unsigned int i = 0; i < intervals.size (); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue