From bbb037cc2773257f81ce20524a3fc0f0d7f7539f Mon Sep 17 00:00:00 2001 From: jesus Date: Fri, 29 May 2015 18:45:44 +0000 Subject: [PATCH] LCL: fix TDBRadioGroup value not set when not in editmode, from Erwin van den Bosch, issue #25754 git-svn-id: trunk@49214 - --- lcl/include/dbradiogroup.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lcl/include/dbradiogroup.inc b/lcl/include/dbradiogroup.inc index d319a7466b..12e7a43352 100644 --- a/lcl/include/dbradiogroup.inc +++ b/lcl/include/dbradiogroup.inc @@ -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;