Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
95edd7c3
Commit
95edd7c3
authored
Nov 12, 2021
by
Claudio Cambra
Browse files
Views now update correctly on adding an exception to recurring incidence
parent
2a7db762
Pipeline
#96908
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/infinitecalendarviewmodel.cpp
View file @
95edd7c3
...
...
@@ -467,6 +467,22 @@ void InfiniteCalendarViewModel::checkModels(const QDate &start, const QDate &end
if
(
incidence
->
recurs
()
&&
incidence
->
recurrence
()
->
timesInInterval
(
modelStartDate
.
startOfDay
(),
modelEndDate
.
endOfDay
()).
length
())
{
model
.
affectedStartDates
.
append
(
modelStartDate
);
}
else
if
(
incidence
->
recurs
())
{
// Check for exceptions as we also need to update in this case
for
(
auto
exDate
:
incidence
->
recurrence
()
->
exDates
())
{
if
(
exDate
>=
modelStartDate
&&
exDate
<=
modelEndDate
)
{
model
.
affectedStartDates
.
append
(
modelStartDate
);
break
;
}
}
for
(
auto
exDateTime
:
incidence
->
recurrence
()
->
exDateTimes
())
{
if
(
exDateTime
.
date
()
>=
modelStartDate
&&
exDateTime
.
date
()
<=
modelEndDate
)
{
model
.
affectedStartDates
.
append
(
modelStartDate
);
break
;
}
}
}
else
if
(
!
incidence
->
recurs
()
&&
(((
start
<=
modelStartDate
)
&&
(
end
>=
modelStartDate
))
||
((
start
<
modelEndDate
)
&&
(
end
>
modelEndDate
))
||
((
start
>=
modelStartDate
)
&&
(
end
<=
modelEndDate
))))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment