ideintf: don't recreate the inspector grid on show component tree option change

git-svn-id: trunk@23204 -
This commit is contained in:
paul 2009-12-20 12:46:11 +00:00
parent 5a9d464e4f
commit e5f3fab6f3

View File

@ -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;