+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();
+}
+