Commit 1c9c5afa authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Show recurring to-dos on DTDUE in the month view, like plain to-dos

The month view shows non-recurring multi-day to-dos on their due date,
but shows recurring to-dos on their start date.  The cause is that
`startDate()` ultimately calls `Todo::dateTime(Incidence::RoleDisplayStart)`,
which returns `dtDue()` instead of `dtStart()`, so the offset to the
start date is miscalculated.
parent 0b1fe58e
Pipeline #63711 passed with stage
in 4 minutes and 48 seconds
......@@ -310,8 +310,9 @@ IncidenceMonthItem::IncidenceMonthItem(MonthScene *monthScene,
// first set to 0, because it's used in startDate()
mRecurDayOffset = 0;
if ((mIncidence->recurs() || mIncidence->recurrenceId().isValid()) && startDate().isValid() && recurStartDate.isValid()) {
mRecurDayOffset = startDate().daysTo(recurStartDate);
const auto incidenceStart = mIncidence->dtStart().toLocalTime().date();
if ((mIncidence->recurs() || mIncidence->recurrenceId().isValid()) && incidenceStart.isValid() && recurStartDate.isValid()) {
mRecurDayOffset = incidenceStart.daysTo(recurStartDate);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment