LCL: Fix not setting RadioGroup.ItemIndex to -1 in GTK2 (Issue #0028133).

git-svn-id: trunk@50508 -
This commit is contained in:
bart 2015-11-26 12:57:12 +00:00
parent 921bba63bb
commit 6dbbab636b

View File

@ -221,8 +221,6 @@ begin
ARadioButton.Parent := Self;
end;
FHiddenButton.Parent:=Self;
if HandleAllocated then
FHiddenButton.HandleNeeded;
// the checked and unchecked states can be applied only after all other
for i := 0 to FItems.Count-1 do
@ -234,6 +232,8 @@ begin
//FHiddenButton must remain the last item in Controls[], so that Controls[] is in sync with Items[]
Self.RemoveControl(FHiddenButton);
Self.InsertControl(FHiddenButton);
if HandleAllocated then
FHiddenButton.HandleNeeded;
FHiddenButton.Checked := (FItemIndex = -1);
UpdateTabStops;
end;