GTK2: Allow TPopupMenu GroupIndex = 0 as a valid index. Issue #28329, patch from Anton Kavalenka.

git-svn-id: trunk@49464 -
This commit is contained in:
juha 2015-06-28 12:45:41 +00:00
parent 5d9db19451
commit 16c48dc400

View File

@ -7250,22 +7250,22 @@ begin
CurrentGroupIndex := integer({%H-}PtrUInt(g_object_get_data({%H-}Pointer(hndMenu), GROUPIDX_DATANAME)));
// Update needed ?
if GroupIndex = CurrentGroupIndex
{ if GroupIndex = CurrentGroupIndex
then begin
Result := True;
Exit;
end;
end;}
// Remove current group
gtk_radio_menu_item_set_group({%H-}PGtkRadioMenuItem(hndMenu), nil);
g_object_set_data({%H-}Pointer(hndMenu), GROUPIDX_DATANAME, nil);
// Check remove only
if GroupIndex = 0
{ if GroupIndex = 0
then begin
Result := True;
Exit;
end;
end; }
// Try to find new group
RadioGroup := GetGroup;