make sure the data link is in edit state (bug #946) from Jesus

git-svn-id: trunk@7234 -
This commit is contained in:
vincents 2005-06-12 13:19:29 +00:00
parent 49823c14e4
commit 5f280446fe

View File

@ -133,12 +133,16 @@ end;
procedure TDBRadioGroup.UpdateRadioButtonStates;
var
OldValue: String;
SettingValue: boolean;
begin
OldValue:=Value;
inherited UpdateRadioButtonStates;
SettingValue := FInSetValue;
Value := GetButtonValue(ItemIndex);
if (Value<>OldValue) then begin
if FDataLink.Editing then FDataLink.Modified;
if (Value<>OldValue) and FDatalink.CanModify and not SettingValue then
begin
FDatalink.Edit; // ensure that we are in edit state
FDataLink.Modified;
end;
end;