summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index ca64e66..cce798f 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -222,8 +222,9 @@ bool CalendarLocal::addEvent( Event *event )
event->registerObserver( this );
setModified( true );
+ if ( event->calID() == 0 )
event->setCalID( mDefaultCalendar );
event->setCalEnabled( true );
return true;
@@ -276,8 +277,9 @@ bool CalendarLocal::addTodo( Todo *todo )
// Set up subtask relations
setupRelations( todo );
setModified( true );
+ if ( todo->calID() == 0 )
todo->setCalID( mDefaultCalendar );
todo->setCalEnabled( true );
return true;
}
@@ -780,8 +782,9 @@ bool CalendarLocal::addJournal(Journal *journal)
journal->registerObserver( this );
setModified( true );
+ if ( journal->calID() == 0 )
journal->setCalID( mDefaultCalendar );
journal->setCalEnabled( true );
return true;
}