From: Joogab Yun Date: Wed, 6 Nov 2019 01:57:57 +0000 (+0900) Subject: GetLineCount() after GetTextDirection() returns wrong value. X-Git-Tag: dali_1.4.49~1^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=1d95817c23961a704cf78c1bb55893fdbf8a6ea4 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( TextLabel::Property::LINE_COUNT )); labelLine.GetProperty< int >( DevelTextLabel::Property::TEXT_DIRECTION ); DALI_LOG_ERROR("lineCount #22: %d \n",labelLine.GetProperty( TextLabel::Property::LINE_COUNT )); } } Change-Id: I197b97aa6f131930627bbef0438950c9679fd58f --- diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index f82eada..139fbfd 100755 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -2459,6 +2459,9 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection() // Clear the update info. This info will be set the next time the text is updated. mImpl->mTextUpdateInfo.Clear(); + // FullRelayoutNeeded should be true because DoRelayout is MAX_FLOAT, MAX_FLOAT. + mImpl->mTextUpdateInfo.mFullRelayoutNeeded = true; + mImpl->mUpdateTextDirection = false; }