[Lazarus] fixes_1_8 - DBLookupComboBox broken
Werner Pamler
werner.pamler at freenet.de
Thu Jan 11 12:22:18 CET 2018
Am 11.01.2018 um 10:14 schrieb Gabor Boros via Lazarus:
> From my POV, unacceptable if a fix broke a feature in a fixes_* branch
> after x.y.0 version released from it.
Sorry for the inconvenience. Call it "unacceptable" or not - that's the
way things are, nobody is perfect.
Please open "dblookupcombobox.inc" (in (lazarus)/lcl/include), find the
method TDBLookupCombobox.Select and replace it by the following code
which restores the code before r56990/r55911 for the case that the
lookupcombobox is not ReadOnly. Your demo works here. Please test
carefully - as you see I don't have any experience with that ominous
Unbound mode...
procedure TDBLookupComboBox.Select;
begin
FDataLink.OnDataChange := nil;
try
if FDataLink.Edit then
begin
FDataLink.Modified;
FDataLink.UpdateData;
inherited Select;
end
else
begin
// if cannot modify, let it reset
if ReadOnly then begin
FDatalink.Reset;
DataChange(Self);
end else begin
FDataLink.Modified;
inherited Select;
end;
end;
finally
FDataLink.OnDataChange := @DataChange;
end;
end;
More information about the Lazarus
mailing list