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.
This commit is contained in:
Andrei Titov 2018-06-19 04:43:09 +03:00 committed by Huy Nguyen
parent f4f1454be1
commit 4669a24fdf

View File

@ -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];
}
}
}