mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 01:30:38 +00:00
Window close/dealloc fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6115 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
79446c8245
commit
2189aa34d7
4 changed files with 38 additions and 11 deletions
|
@ -1833,22 +1833,25 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
|
|||
{
|
||||
NSArray *itemArray;
|
||||
unsigned count;
|
||||
unsigned i;
|
||||
BOOL found = NO;
|
||||
|
||||
itemArray = [menu itemArray];
|
||||
count = [itemArray count];
|
||||
for (i = 0; i < count; i++)
|
||||
while (count-- > 0)
|
||||
{
|
||||
id item = [itemArray objectAtIndex: i];
|
||||
id item = [itemArray objectAtIndex: count];
|
||||
|
||||
if ([item target] == aWindow)
|
||||
{
|
||||
[menu removeItem: item];
|
||||
[menu sizeToFit];
|
||||
[menu update];
|
||||
break;
|
||||
found = YES;
|
||||
}
|
||||
}
|
||||
if (found == YES)
|
||||
{
|
||||
[menu sizeToFit];
|
||||
[menu update];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue