Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index f125edb..cc3908a 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -72,4 +72,4 @@ ContactEditor::ContactEditor( const OContact &entry, setEntry( entry ); - cmbDefaultEmail = 0; + defaultEmailChooserPosition = -1; } @@ -633,4 +633,5 @@ void ContactEditor::defaultEmailChanged(int i){ -void ContactEditor::chooserChange( const QString &textChanged, int index, QLineEdit *inputWid ) { +void ContactEditor::chooserChange( const QString &textChanged, int index, QLineEdit *inputWid, int widgetPos ) { + qDebug("defaultEmailChooserPosition %i, widgetPos %i ",defaultEmailChooserPosition,widgetPos); if (slChooserNames[index] == "Default Email"){ @@ -648,2 +649,6 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineE cmbDefaultEmail->show(); + defaultEmailChooserPosition = widgetPos; + }else if (defaultEmailChooserPosition == widgetPos){ + qDebug("cmbDefaultEmail->hide()"); + if (cmbDefaultEmail) cmbDefaultEmail->hide(); } @@ -656,3 +661,3 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineE void ContactEditor::slotChooser1Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1); + chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1, 1); } @@ -660,3 +665,3 @@ void ContactEditor::slotChooser1Change( const QString &textChanged ) { void ContactEditor::slotChooser2Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2); + chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2, 2); @@ -665,3 +670,3 @@ void ContactEditor::slotChooser2Change( const QString &textChanged ) { void ContactEditor::slotChooser3Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3); + chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3, 3); } @@ -669,3 +674,3 @@ void ContactEditor::slotChooser3Change( const QString &textChanged ) { void ContactEditor::slotChooser4Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4); + chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4, 4); } |