From 43e7fae3cfb9d55f9b584822da49e4042d5517fa Mon Sep 17 00:00:00 2001 From: Sreedeep Moulik Date: Tue, 9 Jul 2013 17:26:03 +0530 Subject: [PATCH] TableView Focus issue - ref review - 80010 Change-Id: I4628dbfe2f9f09fa3e4ee14dfaee3b2f49f46ce7 Signed-off-by: Sreedeep Moulik --- src/ui/controls/FUiCtrl_TableViewItem.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ui/controls/FUiCtrl_TableViewItem.cpp b/src/ui/controls/FUiCtrl_TableViewItem.cpp index 6a6c6b7..668a7f9 100644 --- a/src/ui/controls/FUiCtrl_TableViewItem.cpp +++ b/src/ui/controls/FUiCtrl_TableViewItem.cpp @@ -4781,6 +4781,17 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) pChildControl->SetFocused(true); pChildControl->DrawFocus(); } + else + { + _Control* pParentControl = pFocusedControl->GetParent(); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); + + if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused()) + { + pItem->SetFocused(true); + pItem->DrawFocus(); + } + } break; case _KEY_RIGHT: @@ -4852,6 +4863,17 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) pChildControl->SetFocused(true); pChildControl->DrawFocus(); } + else + { + _Control* pParentControl = pFocusedControl->GetParent(); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); + + if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused()) + { + pItem->SetFocused(true); + pItem->DrawFocus(); + } + } break; case _KEY_ENTER: -- 2.7.4