diff --git a/ChangeLog b/ChangeLog index ec65010b5..07c6a97c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-06-17 Ludovic Marcotte + + * SOPE/NGCards/iCalEvent.m (setAllDayWithStartDate:duration:): + We now correctly remove the duration value in case we're + "converting" the event to an all-day one. This fixes + bug #1312. + 2011-06-16 Ludovic Marcotte * UI/Contacts/UIxContactFolderActions.m (importLdifData:): diff --git a/SOPE/NGCards/iCalEvent.m b/SOPE/NGCards/iCalEvent.m index be80b3766..e8754c869 100644 --- a/SOPE/NGCards/iCalEvent.m +++ b/SOPE/NGCards/iCalEvent.m @@ -56,6 +56,7 @@ duration: (unsigned int) days { NSCalendarDate *endDate; + CardElement *c; [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"] setDate: newStartDate]; @@ -65,6 +66,10 @@ [endDate setTimeZone: [newStartDate timeZone]]; [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"] setDate: endDate]; + + c = [self uniqueChildWithTag: @"duration"]; + if (c) + [self removeChild: c]; } - (void) setEndDate: (NSCalendarDate *) newEndDate