void TextField::ResizeActor(Actor& actor, const Vector2& size)
{
- if (actor.GetProperty<Vector3>(Dali::Actor::Property::SIZE).GetVectorXY() != size)
+ if(actor.GetProperty<Vector3>(Dali::Actor::Property::SIZE).GetVectorXY() != size)
{
actor.SetProperty(Actor::Property::SIZE, size);
}
}
RenderText(updateTextType);
+
+ // If there is text changed, callback is called.
+ if(mTextChanged)
+ {
+ Dali::Toolkit::TextField handle(GetOwner());
+ mTextChangedSignal.Emit(handle);
+ mTextChanged = false;
+ }
}
// The text-field emits signals when the input style changes. These changes of style are
void TextField::TextChanged()
{
- Dali::Toolkit::TextField handle(GetOwner());
- mTextChangedSignal.Emit(handle);
+ mTextChanged = true;
}
void TextField::MaxLengthReached()
mAlignmentOffset(0.f),
mRenderingBackend(DEFAULT_RENDERING_BACKEND),
mExceedPolicy(Dali::Toolkit::TextField::EXCEED_POLICY_CLIP),
- mHasBeenStaged(false)
+ mHasBeenStaged(false),
+ mTextChanged(false)
{
}
{
using namespace Dali::Accessibility;
- auto states = Control::Impl::AccessibleImpl::CalculateStates();
+ auto states = DevelControl::AccessibleImpl::CalculateStates();
states[State::EDITABLE] = true;
states[State::FOCUSABLE] = true;