Changed Control::SetLayout to handle empty layouts
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / control / control-data-impl.cpp
index 73769c8..a6d30d9 100755 (executable)
@@ -1442,6 +1442,15 @@ void Control::Impl::SetLayout( Toolkit::Internal::LayoutItem& layout )
   mLayout->Initialize( controlHandle, controlHandle.GetTypeName() ); // LayoutGroup takes ownership of existing children
 }
 
   mLayout->Initialize( controlHandle, controlHandle.GetTypeName() ); // LayoutGroup takes ownership of existing children
 }
 
+void Control::Impl::RemoveLayout()
+{
+  if( mLayout )
+  {
+    mLayout->Unparent();
+    mLayout.Reset();
+  }
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
 } // namespace Internal
 
 } // namespace Toolkit