IdeIntf: Restore MaxValue in enum/set property editors. FPC will prohibit publishing non-contiguous enums and MaxValue will work. Issue #39832.

This commit is contained in:
juha 2022-08-17 22:06:53 +03:00
parent 7676949e2e
commit b75a7c1e81

View File

@ -3817,7 +3817,7 @@ var
begin
EnumType := GetPropType;
with GetTypeData(EnumType)^ do
for I := MinValue to MinValue+GetEnumNameCount(EnumType)-1 do begin
for I := MinValue to MaxValue do begin
s := GetEnumName(EnumType, I);
Proc(s);
end;
@ -4247,7 +4247,7 @@ var
begin
EnumType := GetTypeData(GetPropType)^.CompType;
with GetTypeData(EnumType)^ do
for I := MinValue to MinValue+GetEnumNameCount(EnumType)-1 do
for I := MinValue to MaxValue do
Proc(TSetElementPropertyEditor.Create(Self, I));
end;
@ -7668,7 +7668,7 @@ var
// Get TypeInfo of set type.
EnumType := GetTypeData(ATypeInfo)^.CompType;
with GetTypeData(EnumType)^ do
for i := MinValue to MinValue+GetEnumNameCount(EnumType)-1 do
for i := MinValue to MaxValue do
begin
Result := PosI(APropNameFilter, GetEnumName(EnumType,i)) > 0;
if Result then