From aa439db7e2fefd5b16d0a6afde4c22c6872ad34d Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Fri, 25 Nov 2016 11:08:21 +0900 Subject: [PATCH] [3.0]Add focus indicator only when attaching physicalkeyboard Add focus indicator only when attaching physicalkeyboard. When user wants to preset focus actor before physicalkeyboard is attached, they can call SetCurrentFocusActor(). Before this patch, it always displays focus indicator whether pyhisicalkeyboard is attached or not. Now, if pyhisicalkeyboard is not attached, SetCurrentFocusActor() dosen't add focus indicator to focus actor. Change-Id: I8a7015279be77c77eb87f2a66346aa5924c76ab5 Signed-off-by: minho.sun --- .../internal/focus-manager/keyboard-focus-manager-impl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index 54d8afa..e6ed691 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -149,9 +149,11 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor( const unsigned int actorID ) if( actor && actor.IsKeyboardFocusable() ) { mIsFocusIndicatorEnabled = true; - // Draw the focus indicator upon the focused actor - actor.Add( GetFocusIndicatorActor() ); - + // Draw the focus indicator upon the focused actor when PhysicalKeyboard is attached + if( mIsKeyboardFocusEnabled ) + { + actor.Add( GetFocusIndicatorActor() ); + } // Send notification for the change of focus actor if( !mFocusChangedSignal.Empty() ) { -- 2.7.4