mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:30:53 +00:00
Select the first item of a NSPopUpButtonCell's new menu
This commit is contained in:
parent
ec3353ecd8
commit
efb9bcb2e7
2 changed files with 7 additions and 2 deletions
|
@ -210,8 +210,9 @@ static NSImage *_pbc_image[5];
|
|||
[self setMenuView: nil];
|
||||
}
|
||||
|
||||
// FIXME: Select the first or last item?
|
||||
[self selectItemAtIndex: [_menu numberOfItems] - 1];
|
||||
// Select the first item because that is the only selection that makes
|
||||
// sense for pull downs.
|
||||
[self selectItemAtIndex: [_menu numberOfItems] > 0 ? 0 : - 1];
|
||||
[self synchronizeTitleAndSelectedItem];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue