From a98ac70b4565e729541783fbbe74924dfd50e386 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 31 Jul 2015 10:06:44 -0700 Subject: [PATCH] Stacked does not repaint when its position changes We were marking the parent *Widget's* render object as needing layout, but we actually need to walk up the component tree until we find the parent *RenderObjectWrapper* so we can mark actually mark the parent render object as needing layout. Fixes #408 --- packages/flutter/lib/widgets/widget.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/widgets/widget.dart b/packages/flutter/lib/widgets/widget.dart index 60efa0a24b5..dcab05d7437 100644 --- a/packages/flutter/lib/widgets/widget.dart +++ b/packages/flutter/lib/widgets/widget.dart @@ -887,8 +887,8 @@ abstract class RenderObjectWrapper extends Widget { if (parentData != null) { assert(root.parentData != null); root.parentData.merge(parentData); // this will throw if the types aren't appropriate - if (parent.root != null) - parent.root.markNeedsLayout(); + if (ancestor != null && ancestor.root != null) + ancestor.root.markNeedsLayout(); } }