From b09fe5e327f5e3aee5a2ec551be5155665353ca1 Mon Sep 17 00:00:00 2001 From: sunziyuan Date: Sun, 21 Jul 2024 09:06:23 +0000 Subject: [PATCH] fix menu item twice measure Signed-off-by: sunziyuan Change-Id: If1969fabb91a4bd4a850e5460583f13ed58ca734 --- .../components_ng/pattern/menu/multi_menu_layout_algorithm.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/frameworks/core/components_ng/pattern/menu/multi_menu_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/menu/multi_menu_layout_algorithm.cpp index beddb544c34..2c89dac599a 100644 --- a/frameworks/core/components_ng/pattern/menu/multi_menu_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/menu/multi_menu_layout_algorithm.cpp @@ -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(); }