From b75a7c1e81caf7a0658ba71c75084c45daac6972 Mon Sep 17 00:00:00 2001 From: juha Date: Wed, 17 Aug 2022 22:06:53 +0300 Subject: [PATCH] IdeIntf: Restore MaxValue in enum/set property editors. FPC will prohibit publishing non-contiguous enums and MaxValue will work. Issue #39832. --- components/ideintf/propedits.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ideintf/propedits.pp b/components/ideintf/propedits.pp index e0214f4955..31cb24d47a 100644 --- a/components/ideintf/propedits.pp +++ b/components/ideintf/propedits.pp @@ -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