{
mCopiedActor = Dali::Actor::New();
mTarget.GetParent().Add(mCopiedActor);
+
mCopiedActor[Dali::DevelActor::Property::SIBLING_ORDER] = static_cast<int32_t>(mTarget[Dali::DevelActor::Property::SIBLING_ORDER]) + 1;
- for(uint32_t i = 0; i < mTarget.GetChildCount(); ++i)
+ while(mTarget.GetChildCount() > 0)
{
- Dali::Actor child = mTarget.GetChildAt(i);
+ Dali::Actor child = mTarget.GetChildAt(0);
Dali::DevelActor::SwitchParent(child, mCopiedActor);
}
mTarget.SetProperties(mOriginalPropertyMap);
if(mMoveTargetChildren)
{
- for(uint32_t i = 0; i < mCopiedActor.GetChildCount(); ++i)
+ while(mCopiedActor.GetChildCount() > 0)
{
- Dali::Actor child = mCopiedActor.GetChildAt(i);
+ Dali::Actor child = mCopiedActor.GetChildAt(0);
Dali::DevelActor::SwitchParent(child, mTarget);
}
mCopiedActor.Unparent();