summaryrefslogtreecommitdiffstats
path: root/korganizer/calendarview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-18 18:48:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-18 18:48:46 +0000
commitb40645d109f976df2c54ecaf3851f3d90138bb8b (patch)
tree33e80bfc8c8ea426da92b9579f2c033d9b312df5 /korganizer/calendarview.cpp
parent740cad9fc10cc4e3683b619cbe06da24ef18f1b0 (diff)
downloadtdepim-b40645d109f976df2c54ecaf3851f3d90138bb8b.tar.gz
tdepim-b40645d109f976df2c54ecaf3851f3d90138bb8b.zip
Fixed a number of issues, including
* event modification and view refresh when GroupWare communication is disabled * Deletion (delay) of first recurring event git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1165287 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/calendarview.cpp')
-rw-r--r--korganizer/calendarview.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 340c6dab..ae4a5b6e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -832,6 +832,7 @@ void CalendarView::updateView()
void CalendarView::updateUnmanagedViews()
{
mDateNavigator->updateDayMatrix();
+ updateView();
}
int CalendarView::msgItemDelete( Incidence *incidence )
@@ -2062,7 +2063,15 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
Incidence *oldIncidence = incidence->clone();
if (incidence->recurrence()->startDate() == itemDate) {
// Moving the first in a series...don't bother with the nonstandard exclusion list
- incidence->recurrence()->setStartDateTime( incidence->recurrence()->getNextDateTime( incidence->recurrence()->startDateTime() ) );
+ Recurrence *recur = incidence->recurrence();
+ Event* thisevent = static_cast<Event*>(incidence);
+ QDateTime newEnd;
+ QDateTime newRecurEnd;
+ newRecurEnd = recur->endDateTime();
+ newEnd.setTime_t( incidence->dtEnd().toTime_t() + ( recur->getNextDateTime( recur->startDateTime() ).toTime_t() - recur->startDateTime().toTime_t() ) );
+ thisevent->setDtEnd( newEnd );
+ incidence->setDtStart( recur->getNextDateTime( recur->startDateTime() ) );
+ recur->setEndDateTime(newRecurEnd);
}
else {
// No choice but to use the exclusion list
@@ -2094,6 +2103,8 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
processIncidenceSelection( 0 );
}
}
+
+ updateView();
}
void CalendarView::connectIncidenceEditor( KOIncidenceEditor *editor )