lcl: avoid reseting value when changing edit state. Issue #21258

git-svn-id: trunk@35307 -
This commit is contained in:
blikblum 2012-02-11 15:59:06 +00:00
parent e484fc0ae2
commit 77b7c33e02

View File

@ -137,11 +137,14 @@ end;
procedure TDBCheckBox.DoOnChange;
begin
//avoid reseting value when state changes
FDataLink.OnDataChange := nil;
if FDatalink.Edit then begin
FDatalink.Modified;
FDataLink.UpdateRecord;
end else
State:=GetFieldCheckState;
FDataLink.OnDataChange := @DataChange;
inherited DoOnChange;
end;