[Tizen] Fix TextChanged signal. 63/258563/1 accepted/tizen/6.0/unified/20210520.123333 submit/tizen_6.0/20210520.083010
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 20 May 2021 07:17:13 +0000 (16:17 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 20 May 2021 08:12:53 +0000 (17:12 +0900)
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 <bowon.ryu@samsung.com>
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp

index c40674a..09c2f20 100644 (file)
@@ -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
index 95ae857..c5b7ef7 100644 (file)
@@ -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