mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:39:29 +02:00
cocoa: fix the combobox itemindex when the new text is not the list
git-svn-id: trunk@59247 -
This commit is contained in:
parent
ec89029ae5
commit
a9e858cf2a
@ -1166,8 +1166,14 @@ begin
|
||||
// this is used for the case of the same items in the combobox
|
||||
Result:=idx
|
||||
else
|
||||
begin
|
||||
// todo: consider a faster search?
|
||||
Result := list.IndexOf(string_.UTF8String);
|
||||
idx := list.IndexOf(string_.UTF8String);
|
||||
if idx<0 then
|
||||
Result := NSNotFound
|
||||
else
|
||||
Result := idx;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCocoaComboBox.numberOfItemsInComboBox(combo:TCocoaComboBox):NSInteger;
|
||||
|
Loading…
Reference in New Issue
Block a user