X-Git-Url: http://Server1/repobrowser/?p=xestiacalendar%2F.git;a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarList.cpp;h=92e7c5058a6334d1e671b54c9ca4c6d9101787a9;hp=b6179a5a25af1730c7a52f669f5ba017e2f1891a;hb=902d948e5e45ad483c8e235690dda8f2bf596ad5;hpb=401fd2eee6047f72fdaf811bbcc3924409a4fb9d diff --git a/source/widgets/XCCalendarList.cpp b/source/widgets/XCCalendarList.cpp index b6179a5..92e7c50 100644 --- a/source/widgets/XCCalendarList.cpp +++ b/source/widgets/XCCalendarList.cpp @@ -31,6 +31,19 @@ XCCalendarList::XCCalendarList(wxWindow *parent) XCCalendarList::~XCCalendarList(){ + // Delete the calendar lists. + + for (vector::iterator accountCtrlIter = accountControlList.begin(); + accountCtrlIter != accountControlList.end(); accountCtrlIter++){ + + delete *accountCtrlIter; + + } + + accountControlList.clear(); + + this->SetSizer(nullptr, true); + } void XCCalendarList::UpdateCalendarList(CalendarDataStorage *dataStorage){ @@ -113,6 +126,8 @@ void XCCalendarList::UpdateCalendarList(CalendarDataStorage *dataStorage){ // Set the updated checksum. checksumUpdate = currentChecksum.checksumValue; + + this->Layout(); }