Merge "When setting a focus actor, we log the current focused actor and the new focus...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / focus-manager / keyboard-focus-manager-impl.cpp
index 8792ab9..380da05 100644 (file)
@@ -1098,13 +1098,16 @@ void KeyboardFocusManager::OnWindowFocusChanged(Window window, bool focusIn)
 
     // Get Current Focused Actor from window
     Actor currentFocusedActor = GetFocusActorFromCurrentWindow();
-    SetCurrentFocusActor(currentFocusedActor);
-
-    if(currentFocusedActor && (mEnableFocusIndicator == ENABLE))
+    if(currentFocusedActor)
     {
-      // Make sure the focused actor is highlighted
-      currentFocusedActor.Add(GetFocusIndicatorActor());
-      mIsFocusIndicatorShown = SHOW;
+      SetCurrentFocusActor(currentFocusedActor);
+
+      if(mEnableFocusIndicator == ENABLE)
+      {
+        // Make sure the focused actor is highlighted
+        currentFocusedActor.Add(GetFocusIndicatorActor());
+        mIsFocusIndicatorShown = SHOW;
+      }
     }
   }
 }