Fix the USE_ASSIGNED_SIZE resize policy to not overwrite the actor's original policy 21/127921/5
authorRichard Huang <r.huang@samsung.com>
Fri, 28 Apr 2017 16:41:58 +0000 (17:41 +0100)
committerNick Holland <nick.holland@partner.samsung.com>
Fri, 12 May 2017 16:21:09 +0000 (16:21 +0000)
commit903530e340e9ad78e20468b13994b02857b45dbd
tree6eddbccb995307b1adbbc5b37b4b543d73535a1f
parent849406d11422cbc3a5bb3e97112728d2711007a7
Fix the USE_ASSIGNED_SIZE resize policy to not overwrite the actor's original policy

OnRelayout is called during the relayout process, and if the actor has calculated
the size of child actors it will add them to the relayout container with their
desired size and set the ResizePolicy::USE_ASSIGNED_SIZE resize policy on them.
However, by doing this, it overwrites the original resize policy of the actor,
so the size calculation of the actor could be incorrect during any further
relayout process.

This patch fixes the above issue by setting an internal flag instead of overwriting
the original resize policy in order to notify the size negotiation algorithm to
assign the size of child actors as calculated during OnRelayout.

Change-Id: Ib1b2e4cfc2a39cfd653e64291e86508351d15606
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/actor-impl.h
dali/internal/event/size-negotiation/relayout-controller-impl.cpp