bug #373742 week view changes after reload r=dbo

This commit is contained in:
michael.buettner%sun.com 2007-04-05 15:28:19 +00:00
Родитель 434ba2b70f
Коммит bfe48a65e2
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -246,7 +246,6 @@ calICSCalendar.prototype = {
.createInstance(Components.interfaces.calICalendar); .createInstance(Components.interfaces.calICalendar);
this.mMemoryCalendar.uri = this.mUri; this.mMemoryCalendar.uri = this.mUri;
this.mMemoryCalendar.wrappedJSObject.calendarToReturn = this; this.mMemoryCalendar.wrappedJSObject.calendarToReturn = this;
this.mMemoryCalendar.addObserver(this.mObserver);
this.mObserver.onStartBatch(); this.mObserver.onStartBatch();
@ -270,6 +269,13 @@ calICSCalendar.prototype = {
} }
this.mObserver.onEndBatch(); this.mObserver.onEndBatch();
this.mObserver.onLoad(); this.mObserver.onLoad();
// Now that all items have been stuffed into the memory calendar
// we should add ourselves as observer. It is important that this
// happens *after* the calls to adoptItem in the above loop to prevent
// the views from being notified.
this.mMemoryCalendar.addObserver(this.mObserver);
this.unlock(); this.unlock();
}, },