Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
XCCalendarDay: Stop Xestia Calendar from crashing when deleting a calendar event
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 4 Feb 2018 11:55:03 +0000 (11:55 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 4 Feb 2018 11:55:03 +0000 (11:55 +0000)
source/widgets/XCCalendarDay.cpp

index 64bd1b4..9af071c 100644 (file)
@@ -524,12 +524,17 @@ void XCCalendarDay::DeleteCalendarEntries(wxCommandEvent &calendarData){
        
        this->Refresh();
        mainPanel->Layout();
-       eventListFrameSizer->Layout();
-       
-       for (auto deleteIter : deleteEntriesList){
+
+       for (auto deleteIter : deleteEntriesList) {
                calendarEntryList.erase(deleteIter);
        }
-       
+
+       if (calendarEntryList.size() > 0)
+       {
+               eventListFrame->Layout();
+               eventListFrameSizer->Layout();
+       }
+
 }
 
 void XCCalendarDay::DeleteCalendarEntry(wxCommandEvent &eventData){
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy