-rw-r--r-- | libkcal/calendar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index a662eeb..b7990d4 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -355,16 +355,17 @@ void Calendar::addIncidenceBranch(Incidence *i) for (inc=Relations.first();inc;inc=Relations.next()) { addIncidenceBranch( inc ); } } bool Calendar::addIncidence(Incidence *i) { Incidence::AddVisitor<Calendar> v(this); + if ( i->calID() == 0 ) i->setCalID( mDefaultCalendar ); i->setCalEnabled( true ); return i->accept(v); } void Calendar::deleteIncidence(Incidence *in) { if ( in->typeID() == eventID ) deleteEvent( (Event*) in ); |