Merge "TextSelectionPopup buttons can be enabled from TextController" into devel...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index 6f868e6..305d61c 100644 (file)
@@ -960,6 +960,24 @@ void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container )
         Self().Add( mRenderableActor );
       }
     }
+
+    for( std::vector<Actor>::const_iterator it = mClippingDecorationActors.begin(),
+           endIt = mClippingDecorationActors.end();
+         it != endIt;
+         ++it )
+    {
+      Actor actor = *it;
+
+      if( mClipper )
+      {
+        mClipper->GetRootActor().Add( actor );
+      }
+      else
+      {
+        Self().Add( actor );
+      }
+    }
+    mClippingDecorationActors.clear();
   }
 }
 
@@ -1045,11 +1063,18 @@ bool TextField::OnKeyEvent( const KeyEvent& event )
   return mController->KeyEvent( event );
 }
 
-void TextField::AddDecoration( Actor& actor )
+void TextField::AddDecoration( Actor& actor, bool needsClipping )
 {
   if( actor )
   {
-    Self().Add( actor );
+    if( needsClipping )
+    {
+      mClippingDecorationActors.push_back( actor );
+    }
+    else
+    {
+      Self().Add( actor );
+    }
   }
 }