mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Consider open track only until reference datetime when determining hour range
- Close #107 Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
b3799ede03
commit
36d7b6f387
1 changed files with 9 additions and 6 deletions
|
@ -200,13 +200,16 @@ std::pair<int, int> Chart::determineHourRange (
|
|||
|
||||
for (auto &track : tracked)
|
||||
{
|
||||
if (day_range.overlaps (track))
|
||||
Interval test {track};
|
||||
|
||||
if (test.is_open ())
|
||||
{
|
||||
Interval clipped = clip (track, day_range);
|
||||
if (track.is_open ())
|
||||
{
|
||||
clipped.end = reference_datetime;
|
||||
}
|
||||
test.end = reference_datetime;
|
||||
}
|
||||
|
||||
if (day_range.overlaps (test))
|
||||
{
|
||||
Interval clipped = clip (test, day_range);
|
||||
|
||||
if (clipped.start.hour () < first_hour)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue