fix menu item twice measure

Signed-off-by: sunziyuan <sunziyuan1@huawei.com>
Change-Id: If1969fabb91a4bd4a850e5460583f13ed58ca734
This commit is contained in:
sunziyuan 2024-07-21 09:06:23 +00:00
parent a8e548c1a3
commit b09fe5e327

View File

@ -110,7 +110,6 @@ void MultiMenuLayoutAlgorithm::UpdateSelfSize(LayoutWrapper* layoutWrapper,
float contentHeight = 0.0f;
float contentWidth = childConstraint.selfIdealSize.Width().value();
for (const auto& child : layoutWrapper->GetAllChildrenWithBuild()) {
child->Measure(ResetLayoutConstraintMinWidth(child, childConstraint));
auto childSize = child->GetGeometryNode()->GetMarginFrameSize();
contentHeight += childSize.Height();
}