From f76dd382b897303ac54af35ff0d59685ec768a2f Mon Sep 17 00:00:00 2001 From: Hixie Date: Tue, 14 Apr 2015 13:35:24 -0700 Subject: [PATCH] [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 --- framework/fn.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/fn.dart b/framework/fn.dart index 43df942099d..e7ff9927644 100644 --- a/framework/fn.dart +++ b/framework/fn.dart @@ -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(); }