[NUI] Fix WidthSpecification and HeightSpecification setting issue. (#1982)
authorbshsqa <32317749+bshsqa@users.noreply.github.com>
Mon, 7 Sep 2020 06:22:18 +0000 (15:22 +0900)
committerGitHub <noreply@github.com>
Mon, 7 Sep 2020 06:22:18 +0000 (15:22 +0900)
commit1ba091c3039bb3a75ea840b910f91ca35c3e00d4
treef48afff56b1f7f350bd2f03b1ec3b82a81cb71e7
parent19076b562e9daee8ded6bd622e2a029970ece7ca
[NUI] Fix WidthSpecification and HeightSpecification setting issue. (#1982)

- Currently, new Size2D is created when one of the WidthSpecification or HeightSpecification is set.
 - Then, the Size2D has incomplete value until the latter one is also entered.
 - e.g. if the size is (500, 500), after just WidthSpecification is entered the Size2D is (500, -2) until HeightSpecification will be entered.
 - (-2 is default negative value that notifing the value is still not set).

 - But, in the property setter of Size2D in View, the value is transfered to the Native API.
 - And the incomplete value make crash in Native API.
 - Because when the latter is entered, we just set Size2D.Width or Size2D.Height not to create Size2D itself. And, exact Size2D is not transfered to the Native.

 - So, this patch postpone to create Size2D utill both WidthSpecification and HeightSpecification are all entered.
 - This create new Size2D whenever new WidthSpecification or HeightSpecification is entered, and it transfers them to the Native well.

Signed-off-by: seungho <seungho@seungho.tn.corp.samsungelectronics.net>
Co-authored-by: seungho <seungho@seungho.tn.corp.samsungelectronics.net>
Co-authored-by: dongsug-song <35130733+dongsug-song@users.noreply.github.com>
src/Tizen.NUI/src/public/BaseComponents/View.cs