IDE: codeexplorer: fixed updating when categories changed

git-svn-id: trunk@13600 -
This commit is contained in:
mattias 2008-01-03 01:24:36 +00:00
parent 8a7cad8815
commit b0ca749b11
3 changed files with 11 additions and 5 deletions

View File

@ -237,6 +237,7 @@ begin
FRefresh:=Src.Refresh;
FMode:=Src.Mode;
FFollowCursor:=Src.FollowCursor;
FCategories:=Src.Categories;
end else
inherited Assign(Source);
end;
@ -379,7 +380,7 @@ begin
NewCategories:=[];
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
if CategoriesCheckGroup.Checked[ord(c)-1] then
include(NewCategories,c);
Include(NewCategories,c);
Options.Categories:=NewCategories;
end;

View File

@ -123,6 +123,7 @@ type
FLastDirectivesChangeStep: integer;
FMode: TCodeExplorerMode;
FLastMode: TCodeExplorerMode;
FLastCodeValid: boolean;
FOnGetCodeTree: TOnGetCodeTree;
FOnGetDirectivesTree: TOnGetDirectivesTree;
FOnJumpToCode: TOnJumpToCode;
@ -418,8 +419,11 @@ end;
procedure TCodeExplorerView.OptionsSpeedButtonClick(Sender: TObject);
begin
if ShowCodeExplorerOptions=mrOk then
if ShowCodeExplorerOptions=mrOk then begin
SaveCodeExplorerOptions;
FLastCodeValid:=false;
Refresh(true);
end;
end;
procedure TCodeExplorerView.RefreshMenuitemCLICK(Sender: TObject);
@ -630,7 +634,7 @@ begin
end;
if Category<>cecNone then begin
ShowNode:=Category in CodeExplorerOptions.Categories;
ShowChilds:=CodeNode.Desc in [ctnTypeDefinition,ctnGenericType];
ShowChilds:=false;
if ShowNode then begin
if fCategoryNodes[Category]=nil then begin
NodeData:=TViewNodeData.Create(CodeNode.Parent);
@ -885,7 +889,8 @@ begin
exit;
end;
end else begin
if (ACodeTool.MainFilename=FCodeFilename)
if FLastCodeValid
and (ACodeTool.MainFilename=FCodeFilename)
and (ACodeTool.Scanner<>nil)
and (ACodeTool.Scanner.ChangeStep=FLastCodeChangeStep)
and (Mode=FLastMode) then begin
@ -894,6 +899,7 @@ begin
end;
end;
FLastCodeValid:=true;
FLastMode:=Mode;
// remember the codetools ChangeStep
if ACodeTool<>nil then begin

View File

@ -5501,7 +5501,6 @@ var
LFMType: string;
CurUnitInfo: TUnitInfo;
UnitCode: TCodeBuffer;
i: Integer;
begin
Result:=false;
TheModalResult:=mrCancel;