mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 05:41:16 +02:00
LCL: fix TDBRadioGroup value not set when not in editmode, from Erwin van den Bosch, issue #25754
git-svn-id: trunk@49214 -
This commit is contained in:
parent
bda023911d
commit
bbb037cc27
@ -124,16 +124,19 @@ end;
|
||||
procedure TDBRadioGroup.UpdateRadioButtonStates;
|
||||
var
|
||||
OldValue: String;
|
||||
NewValue: String;
|
||||
SettingValue: boolean;
|
||||
begin
|
||||
OldValue:=Value;
|
||||
inherited UpdateRadioButtonStates;
|
||||
SettingValue := FInSetValue;
|
||||
Value := GetButtonValue(ItemIndex);
|
||||
if (Value<>OldValue) and FDatalink.CanModify and not SettingValue then
|
||||
NewValue := GetButtonValue(ItemIndex);
|
||||
if (NewValue<>OldValue) and FDatalink.CanModify and not SettingValue then
|
||||
begin
|
||||
if FDatalink.Edit then // ensure that we are in edit state
|
||||
FDataLink.Modified
|
||||
if FDatalink.Edit then begin // ensure that we are in edit state
|
||||
FDataLink.Modified;
|
||||
Value := NewValue;
|
||||
end
|
||||
else
|
||||
DataChange(Self);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user