diff --git a/java/jni/YGJNI.cpp b/java/jni/YGJNI.cpp index 8463421f..0cd97be8 100644 --- a/java/jni/YGJNI.cpp +++ b/java/jni/YGJNI.cpp @@ -175,6 +175,8 @@ static void YGTransferLayoutOutputsRecursive( obj->setFieldValue( doesLegacyStretchBehaviour, YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(root)); + obj->setFieldValue(hasNewLayoutField, true); + YGTransferLayoutDirection(root, obj); if ((edgeSetFlag & MARGIN) == MARGIN) { obj->setFieldValue( @@ -207,8 +209,6 @@ static void YGTransferLayoutOutputsRecursive( borderBottomField, YGNodeLayoutGetBorder(root, YGEdgeBottom)); } - obj->setFieldValue(hasNewLayoutField, true); - YGTransferLayoutDirection(root, obj); root->setHasNewLayout(false); for (uint32_t i = 0; i < YGNodeGetChildCount(root); i++) {