-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 1b83308..b68d88c 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -664,13 +664,16 @@ void ContactEditor::populateDefaultEmailCmb(){ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineEdit *inputWid, int widgetPos ) { QString type = slChooserNames[index]; qDebug("ContactEditor::chooserChange( type=>%s<, textChanged=>%s< index=%i, widgetPos=%i",type.latin1(),textChanged.latin1(), index, widgetPos ); if ( type == "Default Email"){ defaultEmail = textChanged; - if (cmbDefaultEmail) delete cmbDefaultEmail; + if (cmbDefaultEmail){ + delete cmbDefaultEmail; + cmbDefaultEmail = 0l; + } cmbDefaultEmail = new QComboBox(inputWid->parentWidget()); cmbDefaultEmail->setGeometry(inputWid->frameGeometry()); cmbDefaultEmail->show(); populateDefaultEmailCmb(); connect(cmbDefaultEmail,SIGNAL(activated(int)), SLOT(defaultEmailChanged(int))); @@ -681,12 +684,13 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineE widgetPos=-1; }else if (type == "Emails"){ qDebug("emails"); QString de; emails = QStringList::split (",", textChanged ); + if ( cmbDefaultEmail ) populateDefaultEmailCmb(); } slChooserValues[index] = textChanged; |