Disabled populating TShellTreeView and TShellListView in the IDE because they were causing freezes in the Carbon IDE

git-svn-id: trunk@20209 -
This commit is contained in:
sekelsenmat 2009-05-25 14:04:02 +00:00
parent 57a49573b6
commit e289f31627

View File

@ -442,6 +442,9 @@ var
pDrive: PChar; pDrive: PChar;
NewNode: TTreeNode; NewNode: TTreeNode;
begin begin
// avoids crashes in the IDE by not populating during design
if (csDesigning in ComponentState) then Exit;
r := GetLogicalDriveStrings(SizeOf(Drives), Drives); r := GetLogicalDriveStrings(SizeOf(Drives), Drives);
if r = 0 then Exit; if r = 0 then Exit;
if r > SizeOf(Drives) then Exit; if r > SizeOf(Drives) then Exit;
@ -460,6 +463,9 @@ begin
end; end;
{$else} {$else}
begin begin
// avoids crashes in the IDE by not populating during design
if (csDesigning in ComponentState) then Exit;
PopulateTreeNodeWithFiles(nil, GetBasePath()); PopulateTreeNodeWithFiles(nil, GetBasePath());
end; end;
{$endif} {$endif}
@ -560,6 +566,9 @@ var
CurFileName, CurFilePath: string; CurFileName, CurFilePath: string;
CurFileSize: Int64; CurFileSize: Int64;
begin begin
// avoids crashes in the IDE by not populating during design
if (csDesigning in ComponentState) then Exit;
// Check inputs // Check inputs
if FRoot = '' then Exit; if FRoot = '' then Exit;