for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
-
+
delete((*calendarEntryIter));
}
+
+ delete alertIcon;
+ alertIcon = nullptr;
- calendarEntryList.clear();
+ delete highPriorityIcon;
+ highPriorityIcon = nullptr;
- this->Refresh();
+ delete eventListFrame;
+ eventListFrame = nullptr;
+
+ calendarEntryList.clear();
}
// Get the spacing and hide it as well.
- wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
+ /*wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
afterSpacer->Show(false);
afterSpacer->DetachSizer();
delete afterSpacer;
- afterSpacer = nullptr;
+ afterSpacer = nullptr;*/
delete (*calendarEntryIter);
deleteEntriesList.push_back(calendarEntryIter);
// Get the spacing and hide it as well.
- wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
+ /*wxSizerItem *afterSpacer = (*calendarEntryIter)->GetAfterSpacer();
afterSpacer->Show(false);
afterSpacer->DetachSizer();
delete afterSpacer;
- afterSpacer = nullptr;
+ afterSpacer = nullptr;*/
delete (*calendarEntryIter);
deleteEntriesList.push_back(calendarEntryIter);
XCCalendarMonthView::~XCCalendarMonthView(){
+ delete mondayText;
+ delete tuesdayText;
+ delete wednesdayText;
+ delete thursdayText;
+ delete fridayText;
+ delete saturdayText;
+ delete sundayText;
+ for (vector<XCCalendarDay*>::iterator dayIter = calendarDayList.begin();
+ dayIter != calendarDayList.end(); dayIter++){
+
+ delete ((*dayIter));
+
+ }
}
EventProperties *eventInfo = (EventProperties*)eventData.GetClientData();
bool foundDate = false;
+ for (vector<XCCalendarDay*>::iterator dayIter = calendarDayList.begin();
+ dayIter != calendarDayList.end(); dayIter++){
+
+ wxCommandEvent addEvent(XCCALENDARDAY_DELETEENTRY);
+ addEvent.SetId(ID_DELETEENTRY);
+ addEvent.SetInt(eventInfo->eventID);
+ wxPostEvent((*dayIter), addEvent);
+
+ }
+
for (vector<XCCalendarDay*>::iterator dayIter = calendarDayList.begin();
dayIter != calendarDayList.end(); dayIter++){
(*dayIter)->GetCalendarMonth() == (eventInfo->eventMonth + 1) &&
(*dayIter)->GetCalendarDay() == eventInfo->eventDay){
- wxCommandEvent addEvent(XCCALENDARDAY_UPDATEENTRY);
- addEvent.SetId(ID_UPDATEENTRY);
+ wxCommandEvent addEvent(XCCALENDARDAY_ADDENTRY);
+ addEvent.SetId(ID_ADDENTRY);
addEvent.SetClientData(eventInfo);
wxPostEvent((*dayIter), addEvent);
foundDate = true;