Fix the USE_ASSIGNED_SIZE resize policy to not overwrite the actor's original policy 58/127758/4
authorRichard Huang <r.huang@samsung.com>
Fri, 28 Apr 2017 16:41:58 +0000 (17:41 +0100)
committerRichard Huang <r.huang@samsung.com>
Fri, 5 May 2017 13:58:59 +0000 (14:58 +0100)
commit1b75ecbe319aeba104e19180ea32da44f4ff8e8e
tree1671b2a5756c269e82a0020ab68518083d37b35d
parent4c8af0dfb14efdf61ab9eaf507dca05d13b36d0c
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