bmoeskau/Extensible — pull request #52 by gsidler (2013-03-21 18:07:02+00:00)
Title: Bug refresh views for recurring events

Hi Brian
This PR fixes three important issues related to refreshing calendar views after a recurring event has been edited. I am not sure if I have found the best possible ways to fix them but at least you should be able to get a good picture of what the issues are. Let me know if anything is not clear.

1) When a recurring event was turned non-recurrent, the event store was not reloaded, leading to an inconsistency view.

2) After editing recurrent events, the event store was reloaded up to 4 times. To reproduce: Start example application "Recurrence Demo". Go to monthly view, then to daily view, then to weekly view. Edit an existing recurring event by changing the title text. Save change. There will be four event store reloads.

This was caused be weekly view header, weekly view body, daily view header and daily view body each triggering a event store reload. Fixed this in new function refreshAfterEventChange() of AbstractCalendar. A flag is used to remember if a store reload was triggered for an event operation.

3) Weekly calendar view and daily calendar view are refreshed even if they are hidden. Fixed this in functions onUpdate(), onAdd() and onRemove() of AbstractCalendar. For calendar views that are composed of header and body, the hidden status must be checked with the owner of the current component.