Fix TextChanged signal. 59/258559/1
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 07:18:59 +0000 (16:18 +0900)
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 <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 792cd7d..48e0118 100644 (file)
@@ -1470,6 +1470,12 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container)
     ResizeActor(mActiveLayer, contentSize);
   }
 
     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) ||
   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);
     }
 
     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
   }
 
   // The text-editor emits signals when the input style changes. These changes of style are
index 7fc3eca..c0d7903 100644 (file)
@@ -1407,6 +1407,12 @@ void TextField::OnRelayout(const Vector2& size, RelayoutContainer& container)
     ResizeActor(mActiveLayer, contentSize);
   }
 
     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) ||
   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);
     }
 
     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
   }
 
   // The text-field emits signals when the input style changes. These changes of style are