Skip to content
Permalink
Browse files

Consider open track only until reference datetime when determining ho…

…ur range

- Close #107

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
  • Loading branch information...
lauft committed Apr 11, 2019
1 parent b3799ed commit 36d7b6f387cd4fa7cb069703303399c58eb3d6ab
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/Chart.cpp
@@ -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)
{

0 comments on commit 36d7b6f

Please sign in to comment.
You can’t perform that action at this time.