summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2181d2a)
ClearHighlight() used GetHighlightActor() to retrieve the currently
displayed highlight frame in order to determine which actor to remove
from the scene graph. However, it is perfectly legal to
SetHighlightActor() while a highlight frame is displayed (takes effect
on the next GrabHighlight()), so the currently visible highlight frame
handle needs to be saved separately in order to be properly cleared.
Change-Id: Ibf41574bac66f9375b72b31d061195d0235621aa
highlight.SetProperty(Actor::Property::POSITION_Z, 1.0f);
highlight.SetProperty(Actor::Property::POSITION, Vector2(0.0f, 0.0f));
highlight.SetProperty(Actor::Property::POSITION_Z, 1.0f);
highlight.SetProperty(Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ // Remember the highlight actor, so that when the default is changed with
+ // SetHighlightActor(), the currently displayed highlight can still be cleared.
+ currentHighlightActor = highlight;
EnsureSelfVisible();
self.Add(highlight);
SetCurrentlyHighlightedActor(self);
EnsureSelfVisible();
self.Add(highlight);
SetCurrentlyHighlightedActor(self);
return false;
if(GetCurrentlyHighlightedActor() == self)
{
return false;
if(GetCurrentlyHighlightedActor() == self)
{
- self.Remove(GetHighlightActor());
+ self.Remove(currentHighlightActor.GetHandle());
+ currentHighlightActor = {};
SetCurrentlyHighlightedActor({});
EmitHighlighted(false);
return true;
SetCurrentlyHighlightedActor({});
EmitHighlighted(false);
return true;
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/dali-toolkit-common.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/dali-toolkit-common.h>
public virtual Dali::Accessibility::Action
{
Dali::Actor self;
public virtual Dali::Accessibility::Action
{
Dali::Actor self;
+ Dali::WeakHandle<Dali::Actor> currentHighlightActor;
bool modal = false, root = false;
AccessibleImpl(Dali::Actor self, Dali::Accessibility::Role role, bool modal = false);
bool modal = false, root = false;
AccessibleImpl(Dali::Actor self, Dali::Accessibility::Role role, bool modal = false);