LCL: Call EditingDone from TCustomDBComboBox on CloseUp when style is DropDownList. Issue #27186, patch from Tony Whyman.

git-svn-id: trunk@56681 -
This commit is contained in:
juha 2017-12-09 18:01:07 +00:00
parent 59ab7244a8
commit 20ecd8933d
2 changed files with 9 additions and 0 deletions

View File

@ -710,6 +710,7 @@ Type
procedure SetReadOnly(const AValue: Boolean);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure CloseUp; override;
procedure DataChange(Sender: TObject); virtual; abstract;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure Change; override;

View File

@ -65,6 +65,14 @@ begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TCustomDBComboBox.CloseUp;
begin
if [csLoading,csDestroying,csDesigning]*ComponentState<>[] then exit;
if not ReadOnly then
EditingDone;
inherited CloseUp;
end;
procedure TCustomDBComboBox.Notification(AComponent: TComponent; Operation: TOperation);
begin
inherited Notification(AComponent, Operation);