Do nothing when setting focus on same actor.
Change-Id: Iec7a5e11bca9f44a7b197448ff732143ea44036b
Signed-off-by: minho.sun <minho.sun@samsung.com>
+ Actor currentFocusedActor = GetCurrentFocusActor();
+
+ // If developer set focus on same actor, doing nothing
+ if( actor == currentFocusedActor )
+ {
+ if( !actor )
+ {
+ return false;
+ }
+ return true;
+ }
+
// Check whether the actor is in the stage and is keyboard focusable.
if( actor && actor.IsKeyboardFocusable() )
{
// Check whether the actor is in the stage and is keyboard focusable.
if( actor && actor.IsKeyboardFocusable() )
{
{
actor.Add( GetFocusIndicatorActor() );
}
{
actor.Add( GetFocusIndicatorActor() );
}
- // Send notification for the change of focus actor
- Actor currentFocusedActor = GetCurrentFocusActor();
+ // Send notification for the change of focus actor
if( !mFocusChangedSignal.Empty() )
{
mFocusChangedSignal.Emit(currentFocusedActor, actor);
if( !mFocusChangedSignal.Empty() )
{
mFocusChangedSignal.Emit(currentFocusedActor, actor);