cocoa: update Clear for ComboBox string list. Patch by Frank. #35404

git-svn-id: trunk@61006 -
This commit is contained in:
dmitry 2019-04-18 02:48:06 +00:00
parent e2056f0494
commit 161b58005b

View File

@ -186,6 +186,7 @@ type
// Pass only 1 owner and nil for the other ones
constructor Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
procedure Delete(Index: Integer); override;
procedure Clear; override;
end;
IComboboxCallBack = interface(ICommonCallBack)
@ -1163,6 +1164,13 @@ begin
FReadOnlyOwner.removeItemAtIndex(Index);
end;
procedure TCocoaComboBoxList.Clear;
begin
inherited Clear;
if FReadOnlyOwner <> nil then
FReadOnlyOwner.removeAllItems;
end;
constructor TCocoaComboBoxList.Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
begin
FOwner := AOwner;