X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarList.cpp;h=92e7c5058a6334d1e671b54c9ca4c6d9101787a9;hb=8940e6e91652527a21000b2ba2d0c2618c562004;hp=b6179a5a25af1730c7a52f669f5ba017e2f1891a;hpb=401fd2eee6047f72fdaf811bbcc3924409a4fb9d;p=xestiacalendar%2F.git 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(); }