GetLineCount() after GetTextDirection() returns wrong value. 49/217049/2
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 6 Nov 2019 01:57:57 +0000 (10:57 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Wed, 6 Nov 2019 02:01:30 +0000 (02:01 +0000)
commit1d95817c23961a704cf78c1bb55893fdbf8a6ea4
treefdb3b984852b644bdc5427468530d329e255b667
parent6c0adab163e133ebf7c3aa9eee374e299cfe1cca
GetLineCount() after GetTextDirection() returns wrong value.

ex)
   I expect the line count to come out of 3.
   However, after GetProperty(TEXT_DIRECTION), line count is 1.

   labelLine = TextLabel::New();
   labelLine.SetSize( 400, 200 );
   labelLine.SetParentOrigin(ParentOrigin::TOP_LEFT);
   labelLine.SetAnchorPoint(AnchorPoint::TOP_LEFT);
   labelLine.SetPosition( 830.f, 800.f);
   labelLine.SetProperty(TextLabel::Property::POINT_SIZE, 23.f);
   labelLine.SetProperty(Dali::Toolkit::TextLabel::Property::TEXT, "Original text Original text Original text Original text");
   labelLine.SetProperty( TextLabel::Property::MULTI_LINE, true );
   stage.Add( labelLine );

   stage.KeyEventSignal().Connect( this, &HelloWorldController::LineCount );

  void LineCount( const KeyEvent& event )
  {
    if( event.state == KeyEvent::Down )
    {
      // issue
      labelLine.SetProperty(Dali::Toolkit::TextLabel::Property::TEXT, "Changed1 text Changed text Changed text Changed text");
      DALI_LOG_ERROR("lineCount #11: %d \n",labelLine.GetProperty<int>( TextLabel::Property::LINE_COUNT ));
      labelLine.GetProperty< int >( DevelTextLabel::Property::TEXT_DIRECTION );
      DALI_LOG_ERROR("lineCount #22: %d \n",labelLine.GetProperty<int>( TextLabel::Property::LINE_COUNT ));

    }
  }

Change-Id: I197b97aa6f131930627bbef0438950c9679fd58f
dali-toolkit/internal/text/text-controller.cpp