X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarList.cpp;h=92e7c5058a6334d1e671b54c9ca4c6d9101787a9;hb=8940e6e91652527a21000b2ba2d0c2618c562004;hp=4ee85acc802d5f53ebbdc473943c3e354a23c633;hpb=c5716d0f27f0f917282df9121aa97eab7a1bf6b8;p=xestiacalendar%2F.git diff --git a/source/widgets/XCCalendarList.cpp b/source/widgets/XCCalendarList.cpp index 4ee85ac..92e7c50 100644 --- a/source/widgets/XCCalendarList.cpp +++ b/source/widgets/XCCalendarList.cpp @@ -25,21 +25,25 @@ XCCalendarList::XCCalendarList(wxWindow *parent) szrMain = new wxBoxSizer( wxVERTICAL ); this->SetSizer(szrMain); - this->SetSize(wxSize(350, 500)); - - //scwMain = new wxScrolledWindow(); - - //szrScrolled = new wxBoxSizer( wxHORIZONTAL ); - //scwMain->SetSizer(szrScrolled); - - //szrMain->Add(scwMain, 0, wxEXPAND, 5); - //szrMain->Layout(); - + this->SetSize(wxSize(350, 500)); } 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){ @@ -122,6 +126,8 @@ void XCCalendarList::UpdateCalendarList(CalendarDataStorage *dataStorage){ // Set the updated checksum. checksumUpdate = currentChecksum.checksumValue; + + this->Layout(); }