pulled check out of the loop

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16604 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-03-06 13:29:29 +00:00
parent 6d87a14258
commit 66188b6676
+2 -3
View File
@@ -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;