projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Tizen] Do nothing when setting focus on same actor
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
focus-manager
/
keyboard-focus-manager-impl.cpp
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
57fe076
..
2ad1502
100644
(file)
--- a/
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
+++ b/
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
@@
-117,7
+117,7
@@
KeyboardFocusManager::KeyboardFocusManager()
mCurrentFocusActor( 0 ),
mFocusIndicatorActor(),
mFocusGroupLoopEnabled( false ),
mCurrentFocusActor( 0 ),
mFocusIndicatorActor(),
mFocusGroupLoopEnabled( false ),
- mIsFocusIndicatorEnabled(
fals
e ),
+ mIsFocusIndicatorEnabled(
tru
e ),
mIsWaitingKeyboardFocusChangeCommit( false ),
mFocusHistory(),
mSlotDelegate( this ),
mIsWaitingKeyboardFocusChangeCommit( false ),
mFocusHistory(),
mSlotDelegate( this ),
@@
-143,6
+143,18
@@
bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
{
bool success = false;
{
bool success = false;
+ 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() )
{
@@
-150,9
+162,8
@@
bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
{
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);