From 6dbbab636b8722e1063b5bc1f6ac0a64eac869a5 Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Thu, 26 Nov 2015 12:57:12 +0000 Subject: [PATCH] LCL: Fix not setting RadioGroup.ItemIndex to -1 in GTK2 (Issue #0028133). git-svn-id: trunk@50508 - --- lcl/include/radiogroup.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/include/radiogroup.inc b/lcl/include/radiogroup.inc index 384cf57c5c..b31f32e131 100644 --- a/lcl/include/radiogroup.inc +++ b/lcl/include/radiogroup.inc @@ -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;