diff --git a/ideintf/propedits.pp b/ideintf/propedits.pp index 82899971ee..cb8d38a000 100644 --- a/ideintf/propedits.pp +++ b/ideintf/propedits.pp @@ -528,6 +528,7 @@ type function GetValue: ansistring; override; procedure GetValues(Proc: TGetStringProc); override; procedure SetValue(const NewValue: ansistring); override; + function IsNotDefaultValue: boolean; override; end; { TSetPropertyEditor @@ -3201,6 +3202,8 @@ end; function TSetElementPropertyEditor.GetAttributes: TPropertyAttributes; begin Result := [paMultiSelect, paValueList, paSortList]; + if GetDefaultOrdValue <> NoDefaultValue then + Result := Result + [paHasDefaultValue]; end; function TSetElementPropertyEditor.GetName: shortstring; @@ -3234,6 +3237,19 @@ begin SetOrdValue(Integer(S)); end; +function TSetElementPropertyEditor.IsNotDefaultValue: boolean; +var + S1, S2: TIntegerSet; +begin + Result := (paHasDefaultValue in GetAttributes); + if Result then + begin + Integer(S1) := GetOrdValue; + Integer(S2) := GetDefaultOrdValue; + Result := (FElement in S1) <> (FElement in S2); + end; +end; + { TSetPropertyEditor } function TSetPropertyEditor.GetAttributes: TPropertyAttributes;