Fix for N_SE-45925 (focus down for invisible item)
authorkatpaga.a <katpaga.a@samsung.com>
Fri, 12 Jul 2013 14:11:29 +0000 (19:41 +0530)
committerkatpaga.a <katpaga.a@samsung.com>
Fri, 12 Jul 2013 14:11:29 +0000 (19:41 +0530)
Change-Id: I1eff07ad9ddede00716c018c62dd6c77a1268b83
Signed-off-by: katpaga.a <katpaga.a@samsung.com>
src/ui/controls/FUiCtrl_TableViewPresenter.cpp

index 7386279..5cb9c2a 100644 (file)
@@ -5368,6 +5368,19 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                                        }
 
                                        pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+                                       if (!pItem->GetVisibleState())
+                                       {
+                                               TableViewItemTag firstItemPos = {-1, -1};
+                                               GetFirstItem(firstItemPos);
+                                               if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex)
+                                               {
+                                                       return false;
+                                               }
+
+                                               continue;
+                                       }
+
                                        if (pItem->GetBoundsF().y < GetScrollPosition())
                                        {
                                                ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
@@ -5416,6 +5429,19 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                                        }
 
                                        pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+                                       if (!pItem->GetVisibleState())
+                                       {
+                                               TableViewItemTag lastItemPos = {-1, -1};
+                                               GetLastItem(lastItemPos);
+
+                                               if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
+                                               {
+                                                       return false;
+                                               }
+
+                                               continue;
+                                       }
                                        if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
                                        {
                                                ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);