From: Heeyong Song Date: Mon, 10 Sep 2018 02:43:00 +0000 (+0900) Subject: Revert "[Tizen] Changed Control::SetLayout to handle empty layouts" X-Git-Tag: accepted/tizen/unified/20180911.055326~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=204ae59dd359692fcaecb0c474e357cb983b2f6c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Revert "[Tizen] Changed Control::SetLayout to handle empty layouts" This reverts commit e9fe73c6c30130b35d6fbd39587900a8b0022421. Change-Id: I3fafa4c9ed6422e118527dc88239c165ec184356 --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Layouting.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Layouting.cpp index 524f1e0..9206215 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Layouting.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Layouting.cpp @@ -1969,60 +1969,6 @@ int UtcDaliLayouting_RelayoutOnChildOrderChanged(void) END_TEST; } -int UtcDaliLayouting_RemoveLayout01(void) -{ - ToolkitTestApplication application; - tet_infoline(" UtcDaliLayouting_RemoveLayout"); - - Stage stage = Stage::GetCurrent(); - - auto rootControl = Control::New(); - auto absoluteLayout = AbsoluteLayout::New(); - DevelControl::SetLayout( rootControl, absoluteLayout ); - rootControl.SetName( "AbsoluteLayout" ); - stage.Add( rootControl ); - - auto hbox = Control::New(); - auto hboxLayout = LinearLayout::New(); - hboxLayout.SetOrientation( LinearLayout::Orientation::HORIZONTAL ); - DevelControl::SetLayout( hbox, hboxLayout ); - hbox.SetName( "HBox" ); - - std::vector< Control > controls; - controls.push_back( CreateLeafControl( 40, 40 ) ); - controls.push_back( CreateLeafControl( 60, 40 ) ); - - for( auto&& iter : controls ) - { - hbox.Add( iter ); - } - hbox.SetParentOrigin( ParentOrigin::CENTER ); - hbox.SetAnchorPoint( AnchorPoint::CENTER ); - rootControl.Add( hbox ); - - tet_infoline("Layout as normal"); - application.SendNotification(); - application.Render(); - - tet_infoline("Set an empty layout on hbox container"); - LinearLayout emptyLayout; - DevelControl::SetLayout( hbox, emptyLayout ); - - tet_infoline("Run another layout"); - application.SendNotification(); - application.Render(); - - tet_infoline("Check leaf controls haven't moved"); - - DALI_TEST_EQUALS( controls[0].GetProperty( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION ); - DALI_TEST_EQUALS( controls[1].GetProperty( Actor::Property::POSITION ), Vector3( 40.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION ); - - DALI_TEST_EQUALS( controls[0].GetProperty( Actor::Property::SIZE ), Vector3( 40.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION ); - DALI_TEST_EQUALS( controls[1].GetProperty( Actor::Property::SIZE ), Vector3( 60.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION ); - - END_TEST; -} - int UtcDaliLayouting_HboxLayout_TargetSize(void) { ToolkitTestApplication application;