From 54c0cc46a20bfd13a8f0c3130520bcc06359bc9c Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Thu, 21 Sep 2017 23:02:02 +0100 Subject: [PATCH] =?utf8?q?frmEventEditor:=20Fixed=20issue=20where=20calend?= =?utf8?q?ar=20event=20description=20wasn=E2=80=99t=20being=20implemented?= =?utf8?q?=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- source/forms/eventeditor/frmEventEditor.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/forms/eventeditor/frmEventEditor.cpp b/source/forms/eventeditor/frmEventEditor.cpp index 090f53f..59a747a 100644 --- a/source/forms/eventeditor/frmEventEditor.cpp +++ b/source/forms/eventeditor/frmEventEditor.cpp @@ -225,6 +225,19 @@ bool frmEventEditor::SaveContact(){ // Set the data into the calendar event object. eventData.summaryData = txtEventName->GetValue().ToStdString(); + + if (eventData.descriptionList.size() > 0) + { + eventData.descriptionList[0] = txtEventDescription->GetValue().ToStdString(); + } + else + { + eventData.descriptionList.push_back(txtEventDescription->GetValue().ToStdString()); + eventData.descriptionListAltRep.push_back(""); + eventData.descriptionListLanguage.push_back(""); + eventData.descriptionListTokens.push_back(""); + } + eventData.descriptionList.push_back(txtEventDescription->GetValue().ToStdString()); eventData.descriptionListAltRep.push_back(""); eventData.descriptionListLanguage.push_back(""); @@ -297,6 +310,7 @@ bool frmEventEditor::SaveContact(){ EventProperties *eventInfo = new EventProperties; eventInfo->eventName = txtEventName->GetValue().ToStdString(); + eventInfo->eventDescipriton = txtEventDescription->GetValue().ToStdString(); eventInfo->calendarID = calendarIDList[cmbCalendar->GetSelection()]; eventInfo->eventID = addEventResult.calendarEntryID; eventInfo->eventYear = dapStartDate->GetValue().GetYear(); @@ -344,6 +358,7 @@ bool frmEventEditor::SaveContact(){ EventProperties *eventInfo = new EventProperties; eventInfo->eventName = txtEventName->GetValue().ToStdString(); + eventInfo->eventDescipriton = txtEventDescription->GetValue().ToStdString(); eventInfo->calendarID = calendarID; eventInfo->eventID = eventID; eventInfo->eventYear = dapStartDate->GetValue().GetYear(); @@ -579,4 +594,4 @@ void frmEventEditor::UpdateWindowName() updateEvent.SetClientData(updateWindowData); wxPostEvent(this->GetParent(), updateEvent); -} \ No newline at end of file +} -- 2.39.5