mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 18:59:10 +02:00
IDE: call GlobalDesignHook.SetSelection when OI not open
git-svn-id: trunk@57988 -
This commit is contained in:
parent
394f279d8e
commit
4a8534bfab
@ -544,18 +544,27 @@ end;
|
|||||||
|
|
||||||
procedure TCustomFormEditor.SetSelection(const ASelection: TPersistentSelectionList);
|
procedure TCustomFormEditor.SetSelection(const ASelection: TPersistentSelectionList);
|
||||||
begin
|
begin
|
||||||
|
if FSelection.IsEqual(ASelection) then exit;
|
||||||
FSelection.Assign(ASelection);
|
FSelection.Assign(ASelection);
|
||||||
if Obj_Inspector=nil then exit;
|
if Obj_Inspector=nil then
|
||||||
if FSelection.Count>0 then
|
begin
|
||||||
Obj_Inspector.PropertyEditorHook.LookupRoot:=GetLookupRootForComponent(FSelection[0]);
|
GlobalDesignHook.SetSelection(FSelection);
|
||||||
Obj_Inspector.Selection := FSelection;
|
end else begin
|
||||||
|
if FSelection.Count>0 then
|
||||||
|
Obj_Inspector.PropertyEditorHook.LookupRoot:=GetLookupRootForComponent(FSelection[0]);
|
||||||
|
Obj_Inspector.Selection := FSelection;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomFormEditor.AddSelected(Value: TComponent): Integer;
|
function TCustomFormEditor.AddSelected(Value: TComponent): Integer;
|
||||||
Begin
|
Begin
|
||||||
Result := FSelection.Add(Value) + 1;
|
Result := FSelection.Add(Value) + 1;
|
||||||
if Obj_Inspector<>nil then
|
if Obj_Inspector<>nil then
|
||||||
|
begin
|
||||||
|
if not Obj_Inspector.Selection.IsEqual(FSelection) then
|
||||||
Obj_Inspector.Selection := FSelection;
|
Obj_Inspector.Selection := FSelection;
|
||||||
|
end else
|
||||||
|
GlobalDesignHook.SetSelection(FSelection);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomFormEditor.DeleteComponent(AComponent: TComponent; FreeComponent: boolean);
|
procedure TCustomFormEditor.DeleteComponent(AComponent: TComponent; FreeComponent: boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user