summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
authorzautrix <zautrix>2004-12-07 09:55:57 (UTC)
committer zautrix <zautrix>2004-12-07 09:55:57 (UTC)
commit17b25691f0332e648dd1d800e89ccf4e1da8955d (patch) (side-by-side diff)
treeb7bc28e6c57c043fc49328a7ebd86e1b5cd0f17a /libkcal/calendarlocal.cpp
parentdcd2bbbc8d3064b35f268a831c567feaafea5fd8 (diff)
downloadkdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.zip
kdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.tar.gz
kdepimpi-17b25691f0332e648dd1d800e89ccf4e1da8955d.tar.bz2
some kopi usebility fixes
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
@@ -152,11 +152,11 @@ bool CalendarLocal::addEvent( Event *event )
void CalendarLocal::deleteEvent( Event *event )
{
-
-
- if ( mEventList.removeRef( event ) ) {
- setModified( true );
- }
+ if ( mUndoIncidence ) delete mUndoIncidence;
+ mUndoIncidence = event->clone();
+ if ( mEventList.removeRef( event ) ) {
+ setModified( true );
+ }
}
@@ -201,7 +201,9 @@ bool CalendarLocal::addTodo( Todo *todo )
void CalendarLocal::deleteTodo( Todo *todo )
{
// Handle orphaned children
- removeRelations( todo );
+ if ( mUndoIncidence ) delete mUndoIncidence;
+ mUndoIncidence = todo->clone();
+ removeRelations( todo );
if ( mTodoList.removeRef( todo ) ) {
setModified( true );
@@ -687,6 +689,9 @@ bool CalendarLocal::addJournal(Journal *journal)
void CalendarLocal::deleteJournal( Journal *journal )
{
+ if ( mUndoIncidence ) delete mUndoIncidence;
+ mUndoIncidence = journal->clone();
+ mUndoIncidence->setSummary( mUndoIncidence->description().left(25));
if ( mJournalList.removeRef(journal) ) {
setModified( true );
}