Do nothing when setting focus on same actor again.
Change-Id: Ie073856b0019587d71b4ae0f64d8664212e2fccc
+ 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() && actor.OnStage() )
{
// Check whether the actor is in the stage and is keyboard focusable.
if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
{
{
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);