Commit c8809c2d authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by Glen Ditchfield
Browse files

Today button moves Month view to today's month

If the date navigator has selected a week or a work week, the `Today`
button switches the Month view to the month containing the first day of
the selected period containing "today".  On April 2 2022 it showed
March, because the week started on March 28.

This patch uses the "preferred month" infrastructure.  On March 31 it
would show March, and on April 1 it would show April.

BUG: 333066
parent 2ac201a4
Pipeline #158915 passed with stage
in 1 minute and 55 seconds
......@@ -124,7 +124,7 @@ void DateNavigator::selectWorkWeek(QDate d)
}
}
emitSelected();
emitSelected(/* preferredMonth= */ d);
}
void DateNavigator::selectToday()
......@@ -134,7 +134,7 @@ void DateNavigator::selectToday()
const int dateCount = mSelectedDates.count();
if (dateCount == 7) {
selectWeek(d);
selectWeek(d, /* preferredMonth= */ d);
} else if (dateCount == 5) {
selectWorkWeek(d);
} else {
......
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