mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-10 04:00:37 +02:00
Fixed error with tasks that were completed instantly not rendering.
This commit is contained in:
parent
c6be724a96
commit
c1e811a4fe
1 changed files with 19 additions and 25 deletions
|
@ -303,16 +303,6 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
if (_bars.find (epoch) != _bars.end ())
|
||||||
++_bars[epoch]._removed;
|
++_bars[epoch]._removed;
|
||||||
|
|
||||||
if (cumulative)
|
|
||||||
{
|
|
||||||
// Maintain a running total of 'done' tasks that are off the left of the
|
|
||||||
// chart.
|
|
||||||
if (end < _earliest)
|
|
||||||
{
|
|
||||||
++_carryover_done;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < end)
|
while (from < end)
|
||||||
{
|
{
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
|
@ -321,6 +311,8 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||||
from = increment (from, _period);
|
from = increment (from, _period);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cumulative)
|
||||||
|
{
|
||||||
while (from < now)
|
while (from < now)
|
||||||
{
|
{
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
|
@ -328,22 +320,24 @@ void Chart::scan (std::vector <Task>& tasks)
|
||||||
++_bars[epoch]._done;
|
++_bars[epoch]._done;
|
||||||
from = increment (from, _period);
|
from = increment (from, _period);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Maintain a running total of 'done' tasks that are off the left of the
|
||||||
|
// chart.
|
||||||
|
if (end < _earliest)
|
||||||
|
{
|
||||||
|
++_carryover_done;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from, _period);
|
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
if (_bars.find (epoch) != _bars.end ())
|
||||||
++_bars[epoch]._done;
|
++_bars[epoch]._done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Size the data.
|
// Size the data.
|
||||||
maxima ();
|
maxima ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue