From 4669a24fdf96ecbfcff54f76d7c679f967433dda Mon Sep 17 00:00:00 2001 From: Andrei Titov Date: Tue, 19 Jun 2018 04:43:09 +0300 Subject: [PATCH] Fixed removing node from supernode after layout transition (#937) Fixed removing node from supernode after layout transition when automaticallyManagesSubnodes is disabled. In case if developer prefer to manage subnodes by himself then he wants to be sure that stack will not change automatically. --- Source/Private/ASLayoutTransition.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Private/ASLayoutTransition.mm b/Source/Private/ASLayoutTransition.mm index 85cfcd20..f1b15dd0 100644 --- a/Source/Private/ASLayoutTransition.mm +++ b/Source/Private/ASLayoutTransition.mm @@ -137,7 +137,9 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { // In this case we should only remove the subnode if it's still a subnode of the _node that executes a layout transition. // It can happen that a node already did a layout transition and added this subnode, in this case the subnode // would be removed from the new node instead of _node - [subnode _removeFromSupernodeIfEqualTo:_node]; + if (_node.automaticallyManagesSubnodes) { + [subnode _removeFromSupernodeIfEqualTo:_node]; + } } }