It is now called before Focus is changed.
So calling GetCurrentFocusActor() inside the FocusChanged callback returns the prvious actor.
This is a problem.
So, change the FocusChanged callback to be called after the Focus is changed.
Change-Id: Ie270822ac01196e0bf9a18c2e9ab58326fcb745b
actor.Add(GetFocusIndicatorActor());
}
actor.Add(GetFocusIndicatorActor());
}
- // Send notification for the change of focus actor
- if(!mFocusChangedSignal.Empty())
- {
- mFocusChangedSignal.Emit(currentFocusedActor, actor);
- }
Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor);
if(currentlyFocusedControl)
Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor);
if(currentlyFocusedControl)
currentlyFocusedControl.ClearKeyInputFocus();
}
currentlyFocusedControl.ClearKeyInputFocus();
}
- DALI_LOG_INFO(gLogFilter, Debug::General, "[%s:%d] Focus Changed\n", __FUNCTION__, __LINE__);
-
// Save the current focused actor
mCurrentFocusActor = actor;
// Save the current focused actor
mCurrentFocusActor = actor;
mFocusHistory.erase(beginPos);
}
mFocusHistory.erase(beginPos);
}
+ // Send notification for the change of focus actor
+ if(!mFocusChangedSignal.Empty())
+ {
+ mFocusChangedSignal.Emit(currentFocusedActor, actor);
+ }
DALI_LOG_INFO(gLogFilter, Debug::General, "[%s:%d] SUCCEED\n", __FUNCTION__, __LINE__);
success = true;
}
DALI_LOG_INFO(gLogFilter, Debug::General, "[%s:%d] SUCCEED\n", __FUNCTION__, __LINE__);
success = true;
}