-rw-r--r-- | korganizer/koeditordetails.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 2e1ae6e..66f6977 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp | |||
@@ -286,35 +286,41 @@ void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& name | |||
286 | { | 286 | { |
287 | if (uid == this->name()) | 287 | if (uid == this->name()) |
288 | { | 288 | { |
289 | for ( int i = 0; i < nameList.count(); i++) | 289 | for ( int i = 0; i < nameList.count(); i++) |
290 | { | 290 | { |
291 | QString _name = nameList[i]; | 291 | QString _name = nameList[i]; |
292 | QString _email = emailList[i]; | 292 | QString _email = emailList[i]; |
293 | QString _uid = uidList[i]; | 293 | QString _uid = uidList[i]; |
294 | 294 | ||
295 | Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid); | 295 | Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid); |
296 | insertAttendee(a); | 296 | insertAttendee(a); |
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
300 | } | 300 | } |
301 | 301 | ||
302 | |||
303 | void KOEditorDetails::insertAttendee(Attendee *a) | 302 | void KOEditorDetails::insertAttendee(Attendee *a) |
304 | { | 303 | { |
304 | AttendeeListItem *first = (AttendeeListItem*) mListView->firstChild(); | ||
305 | while (first) { | ||
306 | if ( first->data()->name() == a->name() && first->data()->email() == a->email() ) | ||
307 | return; | ||
308 | first = (AttendeeListItem*) first->nextSibling(); | ||
309 | } | ||
310 | |||
305 | AttendeeListItem *item = new AttendeeListItem(a,mListView); | 311 | AttendeeListItem *item = new AttendeeListItem(a,mListView); |
306 | mListView->setSelected( item, true ); | 312 | mListView->setSelected( item, true ); |
307 | } | 313 | } |
308 | 314 | ||
309 | void KOEditorDetails::setDefaults() | 315 | void KOEditorDetails::setDefaults() |
310 | { | 316 | { |
311 | mRsvpButton->setChecked(true); | 317 | mRsvpButton->setChecked(true); |
312 | mListView->clear(); | 318 | mListView->clear(); |
313 | mdelAttendees.clear(); | 319 | mdelAttendees.clear(); |
314 | clearAttendeeInput(); | 320 | clearAttendeeInput(); |
315 | mOrganizerLabel->setText(i18n("Organizer: %1").arg(KOPrefs::instance()->email())); | 321 | mOrganizerLabel->setText(i18n("Organizer: %1").arg(KOPrefs::instance()->email())); |
316 | 322 | ||
317 | mNameEdit->setText(""); | 323 | mNameEdit->setText(""); |
318 | mUidEdit->setText(""); | 324 | mUidEdit->setText(""); |
319 | mEmailEdit->setText(""); | 325 | mEmailEdit->setText(""); |
320 | mRoleCombo->setCurrentItem( 0 ); | 326 | mRoleCombo->setCurrentItem( 0 ); |