mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 17:52:47 +02:00
rtti controls: TTIComboBox now keeps Items if the property does not provide a value list
git-svn-id: trunk@11782 -
This commit is contained in:
parent
217be5842e
commit
fb10d9cb9c
@ -160,7 +160,8 @@ Type
|
||||
var MappedValues: TStrings;
|
||||
UseAllExistingAlias, AddValuesWithoutAlias,
|
||||
IfNoValuesAvailableAddAllAlias: boolean);
|
||||
procedure AssignCollectedAliasValuesTo(DestList: TStrings);
|
||||
procedure AssignCollectedAliasValuesTo(DestList: TStrings;
|
||||
KeepIfNoneCollected: boolean = true);
|
||||
function HasAliasValues: boolean;
|
||||
procedure BuildEnumAliasValues(AStringArray: PString);
|
||||
public
|
||||
@ -1632,7 +1633,6 @@ end;
|
||||
|
||||
procedure TCustomPropertyLink.InvalidateEditor;
|
||||
begin
|
||||
FreeThenNil(FCollectedValues);
|
||||
FreeThenNil(FEditor);
|
||||
end;
|
||||
|
||||
@ -1990,14 +1990,16 @@ begin
|
||||
AddValuesWithoutAlias,IfNoValuesAvailableAddAllAlias);
|
||||
end;
|
||||
|
||||
procedure TCustomPropertyLink.AssignCollectedAliasValuesTo(DestList: TStrings);
|
||||
procedure TCustomPropertyLink.AssignCollectedAliasValuesTo(DestList: TStrings;
|
||||
KeepIfNoneCollected: boolean);
|
||||
var
|
||||
MappedValues: TStrings;
|
||||
begin
|
||||
MappedValues:=nil;
|
||||
MapCollectedValues(AliasValues,MappedValues,true,true,true);
|
||||
try
|
||||
DestList.Assign(MappedValues);
|
||||
if (MappedValues.Count>0) or (not KeepIfNoneCollected) then
|
||||
DestList.Assign(MappedValues);
|
||||
finally
|
||||
MappedValues.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user