mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 01:00:38 +00:00
Fixed a bug in NSPopUpButtonCell - see the ChangeLog for details.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8b09ec55a8
commit
45fdc0cdfa
2 changed files with 12 additions and 2 deletions
|
@ -200,14 +200,17 @@ static NSImage *_pbc_image[2];
|
|||
- (void) insertItemWithTitle: (NSString *)title atIndex: (int)index
|
||||
{
|
||||
id <NSMenuItem> anItem;
|
||||
int count = [_menu numberOfItems];
|
||||
int i = [self indexOfItemWithTitle: title];
|
||||
int i, count;
|
||||
|
||||
i = [self indexOfItemWithTitle: title];
|
||||
|
||||
if (-1 != i)
|
||||
{
|
||||
[self removeItemAtIndex: i];
|
||||
}
|
||||
|
||||
count = [_menu numberOfItems];
|
||||
|
||||
if (index < 0)
|
||||
index = 0;
|
||||
if (index > count)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue