X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=8ba54b775b09f26708ebb638202f62df30b841ab;hp=2d2368bf3348556a592496a62a5dae7f1d4af463;hb=cf38a1c61a88e9431efa4201833e88703057c40e;hpb=66b6b6963d8f8516956550e73f042e686dcec06b diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 2d2368b..8ba54b7 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -359,7 +359,7 @@ void TextLabel::SetProperty(BaseObject* object, Property::Index index, const Pro { if(impl.mTextScroller) { - impl.mTextScroller->StopScrolling(); + impl.mTextScroller->StopScrolling(false); } } // If request is enable (true) then start autoscroll as not already running @@ -1008,6 +1008,25 @@ void TextLabel::OnPropertySet(Property::Index index, const Property::Value& prop } } +void TextLabel::OnSceneConnection(int depth) +{ + if(mController->IsAutoScrollEnabled() || mLastAutoScrollEnabled) + { + mController->SetAutoScrollEnabled(true); + } + Control::OnSceneConnection(depth); +} + +void TextLabel::OnSceneDisconnection() +{ + if(mTextScroller) + { + mLastAutoScrollEnabled = mController->IsAutoScrollEnabled(); + mTextScroller->StopScrolling(true); + } + Control::OnSceneDisconnection(); +} + void TextLabel::OnRelayout(const Vector2& size, RelayoutContainer& container) { DALI_LOG_INFO(gLogFilter, Debug::General, "TextLabel::OnRelayout\n"); @@ -1190,7 +1209,8 @@ void TextLabel::OnAccessibilityStatusChanged() TextLabel::TextLabel(ControlBehaviour additionalBehavior) : Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehavior)), mRenderingBackend(DEFAULT_RENDERING_BACKEND), - mTextUpdateNeeded(false) + mTextUpdateNeeded(false), + mLastAutoScrollEnabled(false) { }