From 9512da4bd2fae434745d1bb55128c894d712b823 Mon Sep 17 00:00:00 2001 From: SungWan Kim Date: Thu, 11 Apr 2013 18:02:13 +0900 Subject: [PATCH] Resolve defects of modifying and displaying repeated events. Change-Id: Ia80ad961795b9d82090db6e17ec04a497651a144 Signed-off-by: SungWan Kim --- src/ClEventEditorForm.cpp | 10 +--------- src/ClEventPresentationModel.cpp | 10 +++++++++- src/ClEventSearchPresentationModel.cpp | 12 ++---------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/ClEventEditorForm.cpp b/src/ClEventEditorForm.cpp index 6f65fd7..6502f53 100644 --- a/src/ClEventEditorForm.cpp +++ b/src/ClEventEditorForm.cpp @@ -855,15 +855,7 @@ EventEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId } __pPm->SetAllEventEditing(allEventEditing); - result r = E_SUCCESS; - if (allEventEditing == true) - { - r = __pPm->SetEventId(pEvent->GetOriginalEventId()); - } - else - { - r = __pPm->SetEventInstance(*pEvent); - } + result r = __pPm->SetEventInstance(*pEvent); if (r != E_SUCCESS) { AppLogDebug("[%s] Unable to get event.", GetErrorMessage(r)); diff --git a/src/ClEventPresentationModel.cpp b/src/ClEventPresentationModel.cpp index 2bf38e8..042058a 100644 --- a/src/ClEventPresentationModel.cpp +++ b/src/ClEventPresentationModel.cpp @@ -387,7 +387,15 @@ EventPresentationModel::GetEventInstance(void) { if (__pEventInstance == null) { - if (__pEvent->IsAllDayEvent() == true) + bool isAllDayEvent = __pEvent->IsAllDayEvent(); + CalEvent* pEvent = __pCalendarbook->GetEventN(__pEvent->GetRecordId()); + if (pEvent != null) + { + isAllDayEvent = pEvent->IsAllDayEvent(); + delete pEvent; + } + + if (isAllDayEvent == true) { // Search InstanceEvent in AllDayEvents CalendarbookFilter filter(CB_FI_TYPE_ALL_DAY_EVENT_INSTANCE); diff --git a/src/ClEventSearchPresentationModel.cpp b/src/ClEventSearchPresentationModel.cpp index e994dd7..fde5c49 100644 --- a/src/ClEventSearchPresentationModel.cpp +++ b/src/ClEventSearchPresentationModel.cpp @@ -360,14 +360,10 @@ EventSearchPresentationModel::SearchEvent(const String& text) { break; } - else if (ResourceManager::ConvertUtcTimeToWallTime(allDayEventPtr->GetEndTime()) < date) // This expression differs from the Non-all-day event's. - { - pNode->Add(allDayEventPtr); - removeList.Add(&allDayEventPtr); - } else { pNode->Add(allDayEventPtr); + removeList.Add(&allDayEventPtr); } } if (removeList.GetCount() > 0) @@ -393,14 +389,10 @@ EventSearchPresentationModel::SearchEvent(const String& text) { break; } - else if (ResourceManager::ConvertUtcTimeToWallTime(eventPtr->GetEndTime()) <= date) // This expression differs from the All-day event's. - { - pNode->Add(eventPtr); - removeList.Add(&eventPtr); - } else { pNode->Add(eventPtr); + removeList.Add(&eventPtr); } } if (removeList.GetCount() > 0) -- 2.7.4