mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 06:57:54 +02:00
Qt,Qt5: Fixed menu radio items. issue #37741
This commit is contained in:
parent
fcf361530d
commit
52f2a8b88f
@ -115,6 +115,14 @@ begin
|
||||
begin
|
||||
Result.setText(AMenuItem.Caption{%H-});
|
||||
Result.setEnabled(AMenuItem.Enabled);
|
||||
|
||||
{issue #37741}
|
||||
if AMenuItem.RadioItem and (AMenuItem.Count = 0) and (AMenuItem.GroupIndex = 0) then
|
||||
begin
|
||||
if AMenuItem.GroupIndex = 0 then
|
||||
AMenuItem.GroupIndex := 1;
|
||||
end;
|
||||
|
||||
Result.setCheckable(AMenuItem.RadioItem or AMenuItem.ShowAlwaysCheckable);
|
||||
Result.BeginUpdate;
|
||||
Result.setChecked(AMenuItem.Checked);
|
||||
|
@ -114,6 +114,14 @@ begin
|
||||
begin
|
||||
Result.setText(GetUtf8String(AMenuItem.Caption));
|
||||
Result.setEnabled(AMenuItem.Enabled);
|
||||
|
||||
{issue #37741}
|
||||
if AMenuItem.RadioItem and (AMenuItem.Count = 0) and (AMenuItem.GroupIndex = 0) then
|
||||
begin
|
||||
if AMenuItem.GroupIndex = 0 then
|
||||
AMenuItem.GroupIndex := 1;
|
||||
end;
|
||||
|
||||
Result.setCheckable(AMenuItem.RadioItem or AMenuItem.ShowAlwaysCheckable);
|
||||
Result.BeginUpdate;
|
||||
Result.setChecked(AMenuItem.Checked);
|
||||
|
Loading…
Reference in New Issue
Block a user