From c4591128165556c58a7a4763f9137b6e7af2548d Mon Sep 17 00:00:00 2001 From: Suhwan_Park Date: Wed, 22 May 2013 13:23:28 +0900 Subject: [PATCH] Modified sweep related APIs on _ListViewImpl/_GroupedListViewImpl Change-Id: I5f8c04ede3d5a13424130a4cea4207fcd01a2aa4 Signed-off-by: Suhwan_Park --- src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp | 11 +++-------- src/ui/controls/FUiCtrl_ListViewImpl.cpp | 11 +++-------- src/ui/inc/FUiCtrl_GroupedListViewImpl.h | 1 - 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp index a85aaa1..a635e53 100644 --- a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp @@ -1085,14 +1085,9 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType if (type == LIST_REFRESH_TYPE_ITEM_MODIFY) { - int sweepGroupIndex = -1; - int sweepItemIndex = -1; - - GetCore().GetSweepItemIndex(sweepGroupIndex, sweepItemIndex); - - if ((sweepGroupIndex == groupIndex) && (sweepItemIndex == itemIndex)) + if (IsContextItemOpened(groupIndex, itemIndex)) { - GetCore().ResetSweepItem(); + CloseContextItem(groupIndex, itemIndex); } int topGroupIndex = -1; @@ -1665,7 +1660,7 @@ _GroupedListViewImpl::OnListViewContextItemStateChanged(_Control& source, int gr { if (__pListItemEvent != null) { - GetCore().ResetSweepItem(); + CloseContextItem(groupIndex, itemIndex); _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); diff --git a/src/ui/controls/FUiCtrl_ListViewImpl.cpp b/src/ui/controls/FUiCtrl_ListViewImpl.cpp index 2e192b2..0a6665f 100644 --- a/src/ui/controls/FUiCtrl_ListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListViewImpl.cpp @@ -1065,14 +1065,9 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type) if (type == LIST_REFRESH_TYPE_ITEM_MODIFY) { - int sweepGroupIndex = -1; - int sweepItemIndex = -1; - - GetCore().GetSweepItemIndex(sweepGroupIndex, sweepItemIndex); - - if ((sweepGroupIndex == 0) && (sweepItemIndex == index)) + if (IsContextItemOpened(index)) { - GetCore().ResetSweepItem(); + CloseContextItem(index); } int topGroupIndex = -1; @@ -1588,7 +1583,7 @@ _ListViewImpl::OnListViewContextItemStateChanged(_Control& source, int groupInde { if (__pListItemEvent != null) { - GetCore().ResetSweepItem(); + CloseContextItem(itemIndex); _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); diff --git a/src/ui/inc/FUiCtrl_GroupedListViewImpl.h b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h index 901c13c..e87cd80 100644 --- a/src/ui/inc/FUiCtrl_GroupedListViewImpl.h +++ b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h @@ -283,7 +283,6 @@ private: bool __redrawListView; bool __isOrientationChanged; bool __needReloadItems; - _ListViewItem* __pItemNeedsLazyDeletion; class _GroupedListViewPropagatedTouchEventListener; _GroupedListViewPropagatedTouchEventListener* __pPropagatedTouchEventListener; -- 2.7.4