-rw-r--r-- | korganizer/calendarview.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 08909ed..f179c58 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1608,4 +1608,9 @@ bool CalendarView::importBday() #ifdef DESKTOP_VERSION + int curCal = mCalendar->defaultCalendar(); + int bd = mCalEditView->getBirtdayID(); + if ( bd == 0 ) + return; + mCalendar->setDefaultCalendar( bd ); KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::Iterator it; @@ -1646,4 +1651,5 @@ bool CalendarView::importBday() } } + mCalendar->setDefaultCalendar( curCal ); updateView(); topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); @@ -1667,7 +1673,15 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd const QStringList& uidList) { + //qDebug("KO::CalendarView::insertBirthdays"); if (uid == this->name()) - { + { + int curCal = mCalendar->defaultCalendar(); + int bd = mCalEditView->getBirtdayID(); + if ( bd == 0 ) + return; + mCalendar->setDefaultCalendar( bd ); + + int count = birthdayList.count(); int addCount = 0; @@ -1732,4 +1746,5 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd } + mCalendar->setDefaultCalendar( curCal ); updateView(); topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |