From cede73dda9b4e687e8c97ce2e08967314f30481d Mon Sep 17 00:00:00 2001 From: stoyan Date: Fri, 4 Apr 2003 12:11:25 +0000 Subject: [PATCH] displayTransient: Call [self sizeToFit] before caclulating locations git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16355 72102866-910b-0410-8b05-ffd578937521 --- Source/NSMenu.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/NSMenu.m b/Source/NSMenu.m index d8a7c8b21..3b5ba60bb 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -1263,6 +1263,11 @@ static NSNotificationCenter *nc; NSDebugLLog (@"NSMenu", @"displaying transient while it is transient"); return; } + + if (_needsSizing) + { + [self sizeToFit]; + } _oldHiglightedIndex = [[self menuRepresentation] highlightedItemIndex]; _transient = YES; @@ -1297,10 +1302,6 @@ static NSNotificationCenter *nc; [contentView addSubview: _view]; [_view update]; - if (_needsSizing) - { - [self sizeToFit]; - } [_bWindow orderFront: self]; }