From: Gwangbok Kim Date: Thu, 30 May 2013 05:08:07 +0000 (+0900) Subject: fix N_SE-39942 X-Git-Tag: 2.2_release~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=593b86f335850edd22b7a597c78e51e47f4dd7da;p=samples%2Fnative%2FContacts.git fix N_SE-39942 Change-Id: Ia3e955e4d1f7629c60aa61af0011fd29854f9af3 Signed-off-by: Gwangbok Kim --- diff --git a/project/src/CategoryAddMemberForm.cpp b/project/src/CategoryAddMemberForm.cpp index d4795fe..152aa4c 100755 --- a/project/src/CategoryAddMemberForm.cpp +++ b/project/src/CategoryAddMemberForm.cpp @@ -35,7 +35,7 @@ CategoryAddMemberForm::CategoryAddMemberForm(void) , __pCategory(null) , __pContact(null) , __pAddressbookMgr(null) - , __checkedIndex(0) + , __checkedIndex(-1) { } @@ -196,14 +196,13 @@ CategoryAddMemberForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& { if (status == LIST_ITEM_STATUS_CHECKED) { - if (__checkedIndex != index || __checkedIndex != 0) + if (__checkedIndex != index && __checkedIndex != -1) { listView.SetItemChecked(__checkedIndex, false); listView.Invalidate(true); } __pContact = static_cast (__pCandidateContactList->GetAt(index)); - __checkedIndex = index; } @@ -212,6 +211,7 @@ CategoryAddMemberForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView.SetItemChecked(index, false); listView.Invalidate(true); __pContact = null; + __checkedIndex = -1; } } diff --git a/project/src/CategoryRemoveMemberForm.cpp b/project/src/CategoryRemoveMemberForm.cpp index 114e0ff..90d27aa 100644 --- a/project/src/CategoryRemoveMemberForm.cpp +++ b/project/src/CategoryRemoveMemberForm.cpp @@ -35,7 +35,7 @@ CategoryRemoveMemberForm::CategoryRemoveMemberForm(void) , __pCategory(null) , __pContact(null) , __pAddressbookMgr(null) - , __checkedIndex(0) + , __checkedIndex(-1) { } @@ -201,7 +201,7 @@ CategoryRemoveMemberForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListVi { if (status == LIST_ITEM_STATUS_CHECKED) { - if (__checkedIndex != index || __checkedIndex != 0) + if (__checkedIndex != index && __checkedIndex != -1) { listView.SetItemChecked(__checkedIndex, false); listView.Invalidate(true); @@ -216,6 +216,7 @@ CategoryRemoveMemberForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListVi listView.SetItemChecked(index, false); listView.Invalidate(true); __pContact = null; + __checkedIndex = -1; } }