LCL: TDBLookupComboBox and csDropDown - restore correct ItemIndex, modified patch from Michal Gawrycki, issue #32943

git-svn-id: trunk@58898 -
This commit is contained in:
jesus 2018-09-07 00:32:16 +00:00
parent 561246b1f9
commit 46263a6495

View File

@ -35,7 +35,7 @@ begin
if i <> -1 then if i <> -1 then
FLookup.UpdateData(i, FScrollListDataset) FLookup.UpdateData(i, FScrollListDataset)
else else
Text := ''; UpdateLookup;
end; end;
function TDBLookupComboBox.DoEdit: boolean; function TDBLookupComboBox.DoEdit: boolean;
@ -63,6 +63,13 @@ begin
UpdateLookup; UpdateLookup;
end; end;
procedure TDBLookupComboBox.DoOnSelect;
begin
if Style=csDropDownList then
UpdateRecord;
inherited DoOnSelect;
end;
procedure TDBLookupComboBox.DestroyWnd; procedure TDBLookupComboBox.DestroyWnd;
begin begin
inherited; inherited;