summaryrefslogtreecommitdiff
path: root/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact/ct-list/src/CtListUgMultiPickController.cpp')
-rw-r--r--lib-contact/ct-list/src/CtListUgMultiPickController.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib-contact/ct-list/src/CtListUgMultiPickController.cpp b/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
index d3e4101..5d754ea 100644
--- a/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
+++ b/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
@@ -330,7 +330,9 @@ bool CtListUgMultiPickController::__changeCheckState(Elm_Object_Item *item, CtCh
else {
int checkedCount = __listModel->getCheckedDataCount();
int maxCount = __listModel->getPersonListCount(LIST_QUERY_DEFAULT);
- WDEBUG("%d, %d", checkedCount, maxCount);
+ int limitCount = __listModel->getLimitCount();
+ if(limitCount > 0 && limitCount < maxCount)
+ maxCount = limitCount;
if(checkedCount == maxCount) {
WDEBUG("check select all");
@@ -609,11 +611,14 @@ void CtListUgMultiPickController::onSelectCheckAll(Elm_Object_Item *selectedItem
Evas_Object *genlist = view->__genlist;
int checkedCount = __listModel->getCheckedDataCount();
int limitCount = __listModel->getLimitCount();
- int maxCount = __listModel->getPersonListCount(LIST_QUERY_DEFAULT);
- if (limitCount > 0 && limitCount < maxCount && checkState == CHECK_ON) {
- __checkLimitCount(maxCount, limitCount);
- return;
+ if(limitCount > 0 && checkState == CHECK_ON) {
+ if(checkedCount == __listModel->getLimitCount()) {
+ __checkLimitCount(checkedCount+1, limitCount);
+ return;
+ }
+ else
+ __checkLimitCount(__listModel->getPersonListCount(LIST_QUERY_DEFAULT), limitCount);
}
WDEBUG("select all %d", checkState);
@@ -635,6 +640,12 @@ void CtListUgMultiPickController::onSelectCheckAll(Elm_Object_Item *selectedItem
continue;
}
+ if (limitCount > 0) {
+ if(checkState == CHECK_ON && checkedCount == limitCount) {
+ break;
+ }
+ }
+
if(__checkItem(item, view, checkState) == false) {
WDEBUG("already checked");
item = elm_genlist_item_next_get(item);