-rw-r--r-- | korganizer/calendarview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4b3f806..558fc55 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2658,24 +2658,33 @@ void CalendarView::clearAllViews() { mTodoList->clearList(); mViewManager->clearAllViews(); SearchDialog * sd = mDialogManager->getSearchDialog(); if ( sd ) { KOListView* kol = sd->listview(); if ( kol ) kol->clearList(); } } void CalendarView::updateView() { + static bool clearallviews = false; + if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { + if ( clearallviews ) { + clearAllViews(); + clearallviews = false; + } + return; + } + clearallviews = true; DateList tmpList = mNavigator->selectedDates(); if ( KOPrefs::instance()->mHideNonStartedTodos ) mTodoList->updateView(); // We assume that the navigator only selects consecutive days. updateView( tmpList.first(), tmpList.last() ); } void CalendarView::updateUnmanagedViews() { mDateNavigator->updateDayMatrix(); } @@ -4402,24 +4411,29 @@ void CalendarView::editIncidence(Incidence *incidence) { if ( incidence ) { EditIncidenceVisitor v; v.act( incidence, this ); } } void CalendarView::deleteIncidence(Incidence *incidence) { //qDebug(" CalendarView::deleteIncidence "); + if ( incidence == 0 ) { + updateView(); + emit updateSearchDialog(); + return; + } if ( incidence ) { DeleteIncidenceVisitor v; v.act( incidence, this ); } } void CalendarView::lookForOutgoingMessages() { OutgoingDialog *ogd = mDialogManager->outgoingDialog(); ogd->loadMessages(); } |