Copy the recurrence, don't just ref it
GcalRecurrence is shared/mutable. So, if we have curr.recur = ref(event.recur) orig.recur = ref(curr.recur) then recurrence_changed() will return false, since both orig.recur and curr.recur will point to the same object. We need fresh copies. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
7bb6549cb6
commit
8c0281aef5
@@ -134,7 +134,7 @@ gcal_schedule_values_copy (const GcalScheduleValues *values)
|
|||||||
copy.all_day = values->all_day;
|
copy.all_day = values->all_day;
|
||||||
copy.date_start = values->date_start ? g_date_time_ref (values->date_start) : NULL;
|
copy.date_start = values->date_start ? g_date_time_ref (values->date_start) : NULL;
|
||||||
copy.date_end = values->date_end ? g_date_time_ref (values->date_end) : NULL;
|
copy.date_end = values->date_end ? g_date_time_ref (values->date_end) : NULL;
|
||||||
copy.recur = values->recur ? gcal_recurrence_ref (values->recur) : NULL;
|
copy.recur = values->recur ? gcal_recurrence_copy (values->recur) : NULL;
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
@@ -1099,7 +1099,7 @@ gcal_schedule_section_values_from_event (GcalEvent *event,
|
|||||||
|
|
||||||
if (recur)
|
if (recur)
|
||||||
{
|
{
|
||||||
values.recur = gcal_recurrence_ref (recur);
|
values.recur = gcal_recurrence_copy (recur);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user