mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 01:59:12 +02:00
ideintf: don't recreate the inspector grid on show component tree option change
git-svn-id: trunk@23204 -
This commit is contained in:
parent
5a9d464e4f
commit
e5f3fab6f3
@ -4523,29 +4523,28 @@ end;
|
|||||||
|
|
||||||
procedure TObjectInspectorDlg.SetShowComponentTree(const AValue: boolean);
|
procedure TObjectInspectorDlg.SetShowComponentTree(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
if FShowComponentTree=AValue then exit;
|
if FShowComponentTree = AValue then Exit;
|
||||||
FShowComponentTree:=AValue;
|
FShowComponentTree := AValue;
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
try
|
try
|
||||||
ShowComponentTreePopupMenuItem.Checked:=FShowComponentTree;
|
ShowComponentTreePopupMenuItem.Checked := FShowComponentTree;
|
||||||
// hide controls while rebuilding
|
// hide controls while rebuilding
|
||||||
if Splitter1<>nil then
|
if Splitter1 <> nil then
|
||||||
Splitter1.Visible:=false;
|
Splitter1.Visible := False;
|
||||||
DestroyNoteBook;
|
ComponentTree.Visible := False;
|
||||||
ComponentTree.Visible:=false;
|
AvailPersistentComboBox.Visible := False;
|
||||||
AvailPersistentComboBox.Visible:=false;
|
|
||||||
// rebuild controls
|
// rebuild controls
|
||||||
ComponentTree.Parent:=Self;
|
ComponentTree.Parent := Self;
|
||||||
ComponentTree.Align:=alTop;
|
ComponentTree.Align := alTop;
|
||||||
if FShowComponentTree then
|
if FShowComponentTree then
|
||||||
CreateSplitter(True)
|
CreateSplitter(True)
|
||||||
else begin
|
else
|
||||||
ComponentTree.Height:=ComponentTreeHeight;
|
begin
|
||||||
|
ComponentTree.Height := ComponentTreeHeight;
|
||||||
FreeAndNil(Splitter1);
|
FreeAndNil(Splitter1);
|
||||||
end;
|
end;
|
||||||
ComponentTree.Visible:=FShowComponentTree;
|
ComponentTree.Visible := FShowComponentTree;
|
||||||
AvailPersistentComboBox.Visible:=not FShowComponentTree;
|
AvailPersistentComboBox.Visible := not FShowComponentTree;
|
||||||
CreateNoteBook;
|
|
||||||
finally
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user