mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 01:16:01 +02:00
IDE: set csAncestor for root components with ancestors
git-svn-id: trunk@22487 -
This commit is contained in:
parent
c18d7be9ac
commit
4346679737
@ -295,6 +295,7 @@ const
|
||||
procedure SetComponentDesignMode(AComponent: TComponent; Value: Boolean);
|
||||
procedure SetComponentDesignInstanceMode(AComponent: TComponent; Value: Boolean);
|
||||
procedure SetComponentInlineMode(AComponent: TComponent; Value: Boolean);
|
||||
procedure SetComponentAncestorMode(AComponent: TComponent; Value: Boolean);
|
||||
|
||||
implementation
|
||||
|
||||
@ -325,6 +326,11 @@ begin
|
||||
TSetDesigningComponent.SetInlineOfComponent(AComponent, True);
|
||||
end;
|
||||
|
||||
procedure SetComponentAncestorMode(AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
TSetDesigningComponent(AComponent).SetAncestor(Value);
|
||||
end;
|
||||
|
||||
class procedure TSetDesigningComponent.SetDesigningOfComponent(
|
||||
AComponent: TComponent; Value: Boolean);
|
||||
begin
|
||||
@ -862,11 +868,12 @@ function TJITComponentList.AddJITComponentFromStream(BinStream: TStream;
|
||||
Abort:=false;
|
||||
OnFindAncestors(Self,AncestorClass,Ancestors,AncestorStreams,Abort);
|
||||
if Abort then exit(false);
|
||||
if Ancestors<>nil then begin
|
||||
if (Ancestors<>nil) and (Ancestors.Count>0) then begin
|
||||
for i:=Ancestors.Count-1 downto 0 do begin
|
||||
ReadStream(TExtMemoryStream(AncestorStreams[i]),
|
||||
TComponent(Ancestors[i]).ClassType);
|
||||
end;
|
||||
SetComponentAncestorMode(FCurReadJITComponent,true);
|
||||
end;
|
||||
finally
|
||||
Ancestors.Free;
|
||||
|
@ -4346,7 +4346,8 @@ begin
|
||||
end;
|
||||
|
||||
function TMainIDE.CreateNewForm(NewUnitInfo: TUnitInfo;
|
||||
AncestorType: TPersistentClass; ResourceCode: TCodeBuffer; UseCreateFormStatements: Boolean): TModalResult;
|
||||
AncestorType: TPersistentClass; ResourceCode: TCodeBuffer;
|
||||
UseCreateFormStatements: Boolean): TModalResult;
|
||||
var
|
||||
CInterface: TComponentInterface;
|
||||
NewComponent: TComponent;
|
||||
|
Loading…
Reference in New Issue
Block a user