From deee488c2c8aa06a5c7b7372eed27f97870ea41a Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Thu, 20 May 2021 16:17:13 +0900 Subject: [PATCH] Fix TextChanged signal. Due to the previous patches (below patches), 3d28744e61ba8b68daa957827a55224f11bbf2f0 33ccee79d16a90d5f7ab427de1503ccc5bee4324 the sequence of Signal emit and Render has been different. This caused a compatibility issue. This patch fixes a compatibility issue by change the timing of the signal emit. Change-Id: I76633936fb32e91d685f4bc6042c69ebd663c08d Signed-off-by: Bowon Ryu --- .../internal/controls/text-controls/text-editor-impl.cpp | 12 ++++++------ .../internal/controls/text-controls/text-field-impl.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp index 792cd7d..48e0118 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -1470,6 +1470,12 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) ResizeActor(mActiveLayer, contentSize); } + // If there is text changed, callback is called. + if(mTextChanged) + { + EmitTextChangedSignal(); + } + const Text::Controller::UpdateTextType updateTextType = mController->Relayout(contentSize, layoutDirection); if((Text::Controller::NONE_UPDATED != updateTextType) || @@ -1489,12 +1495,6 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) } RenderText(updateTextType); - - // If there is text changed, callback is called. - if(mTextChanged) - { - EmitTextChangedSignal(); - } } // The text-editor emits signals when the input style changes. These changes of style are diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 7fc3eca..c0d7903 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -1407,6 +1407,12 @@ void TextField::OnRelayout(const Vector2& size, RelayoutContainer& container) ResizeActor(mActiveLayer, contentSize); } + // If there is text changed, callback is called. + if(mTextChanged) + { + EmitTextChangedSignal(); + } + const Text::Controller::UpdateTextType updateTextType = mController->Relayout(contentSize, layoutDirection); if((Text::Controller::NONE_UPDATED != updateTextType) || @@ -1426,12 +1432,6 @@ void TextField::OnRelayout(const Vector2& size, RelayoutContainer& container) } RenderText(updateTextType); - - // If there is text changed, callback is called. - if(mTextChanged) - { - EmitTextChangedSignal(); - } } // The text-field emits signals when the input style changes. These changes of style are -- 2.7.4