NSMenuView.m setWindowFrameForAttachingToRect: sizing fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16253 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stoyan 2003-03-25 09:51:00 +00:00
parent ceb2323c0b
commit 219f322e53
2 changed files with 15 additions and 3 deletions

View file

@ -801,16 +801,21 @@ _addLeftBorderOffsetToRect(NSRect aRect)
{
[_titleView removeFromSuperview];
_titleView = nil;
_needsSizing = YES;
}
_cellSize = cellFrame.size;
[self sizeToFit];
// Only call sizeToFit if needed.
if ((NSEqualSizes(_cellSize, cellFrame.size) == NO) || _needsSizing)
{
_cellSize = cellFrame.size;
[self sizeToFit];
}
/*
* Compute the frame
*/
screenFrame = screenRect;
if (items > 1)
if (items > 0)
{
float f;