void TextEditor::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::TextEditor handle(GetOwner());
+ mTextChangedSignal.Emit(handle);
+ mTextChanged = false;
+ }
}
// The text-editor emits signals when the input style changes. These changes of style are
void TextEditor::TextChanged()
{
- Dali::Toolkit::TextEditor handle(GetOwner());
- mTextChangedSignal.Emit(handle);
+ mTextChanged = true;
}
void TextEditor::MaxLengthReached()
mHasBeenStaged(false),
mScrollAnimationEnabled(false),
mScrollBarEnabled(false),
- mScrollStarted(false)
+ mScrollStarted(false),
+ mTextChanged(false)
{
}