-rw-r--r-- | libkcal/calendarlocal.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index ca64e66..cce798f 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -224,5 +224,6 @@ bool CalendarLocal::addEvent( Event *event ) setModified( true ); - event->setCalID( mDefaultCalendar ); + if ( event->calID() == 0 ) + event->setCalID( mDefaultCalendar ); event->setCalEnabled( true ); @@ -278,4 +279,5 @@ bool CalendarLocal::addTodo( Todo *todo ) setModified( true ); + if ( todo->calID() == 0 ) todo->setCalID( mDefaultCalendar ); todo->setCalEnabled( true ); @@ -782,5 +784,6 @@ bool CalendarLocal::addJournal(Journal *journal) setModified( true ); - journal->setCalID( mDefaultCalendar ); + if ( journal->calID() == 0 ) + journal->setCalID( mDefaultCalendar ); journal->setCalEnabled( true ); return true; |