From 66188b66764cb518c53a3c3c1e350d35ee5e930b Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 6 Mar 2006 13:29:29 +0000 Subject: [PATCH] pulled check out of the loop git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16604 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index eb6ab778f2..6d8b9df5af 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -1327,12 +1327,11 @@ BMenu::ComputeLayout(int32 index, bool bestFit, bool moveItems, item->fBounds.bottom = item->fBounds.top + iHeight + fPad.top + fPad.bottom; frame.right = max_c(frame.right, iWidth + fPad.left + fPad.right + 20); - if (fMaxContentWidth > 0) - frame.right = min_c(frame.right, fMaxContentWidth); - frame.bottom = item->fBounds.bottom + 1.0f; } } + if (fMaxContentWidth > 0) + frame.right = min_c(frame.right, fMaxContentWidth); for (int32 i = 0; i < fItems.CountItems(); i++) ItemAt(i)->fBounds.right = frame.right;