[Tizen] code clean up : Relayout again for LTR / RTL order when layout direction is
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-editor-impl.cpp
index d125510..7ca679c 100755 (executable)
@@ -1244,11 +1244,10 @@ void TextEditor::OnInitialize()
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
   // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( stage.GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
   mController->SetLayoutDirection( layoutDirection );
 
-  self.LayoutDirectionChangedSignal().Connect( this, &TextEditor::OnLayoutDirectionChanged );
-
   // Forward input events to controller
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
@@ -1295,11 +1294,6 @@ void TextEditor::OnInitialize()
   self.Add( mStencil );
 }
 
-void TextEditor::OnLayoutDirectionChanged( Dali::Actor actor, Dali::LayoutDirection::Type type )
-{
-  mController->UpdateLayoutDirectionChanged( type );
-}
-
 void TextEditor::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnStyleChange\n");