[Effen] We need to update the layout manager in _syncNode() also,

otherwise when you switch from one Container instance to another, you
end up with the the layout being done by the wrong instance.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1086983004
This commit is contained in:
Hixie 2015-04-14 13:35:24 -07:00
parent 987ba83d49
commit f76dd382b8

View File

@ -607,8 +607,12 @@ abstract class LayoutContainer extends Container {
return result;
}
// If we ever reuse sky nodes for different classes, then we should
// call _root.setLayoutManager(null) during _remove() here.
void _syncNode(SkyNodeWrapper old) {
super._syncNode(old);
_root.setLayoutManager(() => layout(_root));
_root.setNeedsLayout();
}