summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Unidiff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 3f46d53..12294c0 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -153,9 +153,9 @@ bool CalendarLocal::addEvent( Event *event )
153void CalendarLocal::deleteEvent( Event *event ) 153void CalendarLocal::deleteEvent( Event *event )
154{ 154{
155 155 if ( mUndoIncidence ) delete mUndoIncidence;
156 156 mUndoIncidence = event->clone();
157 if ( mEventList.removeRef( event ) ) { 157 if ( mEventList.removeRef( event ) ) {
158 setModified( true ); 158 setModified( true );
159 } 159 }
160} 160}
161 161
@@ -202,5 +202,7 @@ void CalendarLocal::deleteTodo( Todo *todo )
202{ 202{
203 // Handle orphaned children 203 // Handle orphaned children
204 removeRelations( todo ); 204 if ( mUndoIncidence ) delete mUndoIncidence;
205 mUndoIncidence = todo->clone();
206 removeRelations( todo );
205 207
206 if ( mTodoList.removeRef( todo ) ) { 208 if ( mTodoList.removeRef( todo ) ) {
@@ -688,4 +690,7 @@ bool CalendarLocal::addJournal(Journal *journal)
688void CalendarLocal::deleteJournal( Journal *journal ) 690void CalendarLocal::deleteJournal( Journal *journal )
689{ 691{
692 if ( mUndoIncidence ) delete mUndoIncidence;
693 mUndoIncidence = journal->clone();
694 mUndoIncidence->setSummary( mUndoIncidence->description().left(25));
690 if ( mJournalList.removeRef(journal) ) { 695 if ( mJournalList.removeRef(journal) ) {
691 setModified( true ); 696 setModified( true );