--- a/phonebookui/pbkcommonui/src/cntnoteeditormodel.cpp Fri Jun 11 13:29:23 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntnoteeditormodel.cpp Wed Jun 23 18:02:44 2010 +0300
@@ -36,6 +36,7 @@
void CntNoteEditorModel::insertDetailField()
{
QContactNote emptyNote;
+ mNoteList.append( emptyNote );
appendDataFormItem( new CntDetailModelItem(emptyNote), invisibleRootItem() );
}
@@ -46,10 +47,14 @@
int count( root->childCount() );
for ( int i(0); i < count; i++ ) {
CntDetailModelItem* detail = static_cast<CntDetailModelItem*>( root->childAt(i) );
- QContactDetail note = detail->detail();
- mContact->saveDetail( ¬e );
+ QContactNote note = detail->detail();
- if ( note.value(QContactNote::FieldNote).isEmpty() )
+ if ( !mNoteList.contains(note) )
+ {
+ mContact->saveDetail( ¬e );
+ }
+
+ if ( note.note().isEmpty() )
{
mContact->removeDetail( ¬e );
}