From 1039421a1d4292e6cbc0a124c12d4358fe6417f5 Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Thu, 20 May 2021 16:17:13 +0900 Subject: [PATCH] [Tizen] Fix TextChanged signal. Due to the previous patches (below patches), cef89858f1d7ca38d2db7aecb934ceada5439e09 2a386a32eadd81f8f7483f408d06db0d3c15f40e 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 c40674a..09c2f20 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -1309,6 +1309,12 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) mActiveLayer.SetProperty(Actor::Property::POSITION, Vector2(padding.start, padding.top)); } + // 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) || @@ -1328,12 +1334,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 95ae857..c5b7ef7 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -1327,6 +1327,12 @@ void TextField::OnRelayout(const Vector2& size, RelayoutContainer& container) mActiveLayer.SetProperty(Actor::Property::POSITION, Vector2(padding.start, padding.top)); } + // 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) || @@ -1346,12 +1352,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