mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 19:39:29 +01:00
IdeIntf: Clean comp editor code, use new function EditCollectionNoAddDel instead of default param for old function.
git-svn-id: trunk@59117 -
This commit is contained in:
parent
94c4596ba4
commit
76f7d02e9f
@ -398,8 +398,8 @@ type
|
||||
|
||||
TFlowPanelComponentEditor = class(TComponentEditor)
|
||||
public
|
||||
procedure ExecuteVerb(AIndex: Integer); override;
|
||||
function GetVerb(AIndex: Integer): string; override;
|
||||
procedure ExecuteVerb({%H-}AIndex: Integer); override;
|
||||
function GetVerb({%H-}AIndex: Integer): string; override;
|
||||
function GetVerbCount: Integer; override;
|
||||
function FlowPanel: TFlowPanel;
|
||||
end;
|
||||
@ -1268,12 +1268,9 @@ end;
|
||||
|
||||
{ TFlowPanelComponentEditor }
|
||||
|
||||
var
|
||||
FlowPanelEditor: TCollectionPropertyEditor = nil;
|
||||
|
||||
procedure TFlowPanelComponentEditor.ExecuteVerb(AIndex: Integer);
|
||||
begin
|
||||
EditCollection(FlowPanel, FlowPanel.ControlList, 'ControlList', true);
|
||||
EditCollectionNoAddDel(FlowPanel, FlowPanel.ControlList, 'ControlList');
|
||||
end;
|
||||
|
||||
function TFlowPanelComponentEditor.GetVerb(AIndex: Integer): string;
|
||||
|
||||
@ -1766,8 +1766,8 @@ function ControlAcceptsStreamableChildComponent(aControl: TWinControl;
|
||||
|
||||
procedure LazSetMethodProp(Instance : TObject;PropInfo : PPropInfo; Value : TMethod);
|
||||
procedure WritePublishedProperties(Instance: TPersistent);
|
||||
procedure EditCollection(AComponent: TComponent; ACollection: TCollection;
|
||||
APropertyName: String; NoAddDelete: Boolean = false);
|
||||
procedure EditCollection(AComponent: TComponent; ACollection: TCollection; APropName: String);
|
||||
procedure EditCollectionNoAddDel(AComponent: TComponent; ACollection: TCollection; APropName: String);
|
||||
|
||||
// Returns true if given property should be displayed on the property list
|
||||
// filtered by AFilter and APropNameFilter.
|
||||
@ -7516,13 +7516,14 @@ begin
|
||||
Result := Pos(AUpperSubText, UpperCase(AText)) > 0;
|
||||
end;
|
||||
|
||||
procedure EditCollection(AComponent: TComponent; ACollection: TCollection;
|
||||
APropertyName: String; NoAddDelete: Boolean = false);
|
||||
procedure EditCollection(AComponent: TComponent; ACollection: TCollection; APropName: String);
|
||||
begin
|
||||
if NoAddDelete then
|
||||
TNoAddDeleteCollectionPropertyEditor.ShowCollectionEditor(ACollection, AComponent, APropertyName)
|
||||
else
|
||||
TCollectionPropertyEditor.ShowCollectionEditor(ACollection, AComponent, APropertyName);
|
||||
TCollectionPropertyEditor.ShowCollectionEditor(ACollection, AComponent, APropName);
|
||||
end;
|
||||
|
||||
procedure EditCollectionNoAddDel(AComponent: TComponent; ACollection: TCollection; APropName: String);
|
||||
begin
|
||||
TNoAddDeleteCollectionPropertyEditor.ShowCollectionEditor(ACollection, AComponent, APropName);
|
||||
end;
|
||||
|
||||
function IsInteresting(AEditor: TPropertyEditor; const AFilter: TTypeKinds;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user