mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 15:40:41 +02:00
todolist: use project as default, fixed update caption, bug #16945
git-svn-id: trunk@26680 -
This commit is contained in:
parent
37058495b7
commit
e33d5d0f1a
@ -135,7 +135,9 @@ begin
|
||||
IDEWindowCreators.ShowForm(ToDoWindowName,true);
|
||||
Pkg:=PackageEditingInterface.GetPackageOfEditorItem(Sender);
|
||||
if Pkg<>nil then
|
||||
IDETodoWindow.OwnerFilename:=Pkg.Filename;
|
||||
IDETodoWindow.OwnerFilename:=Pkg.Filename
|
||||
else
|
||||
IDETodoWindow.OwnerFilename:=LazarusIDE.ActiveProject.ProjectInfoFile;
|
||||
end;
|
||||
|
||||
procedure CreateIDEToDoWindow(Sender: TObject; aFormName: string;
|
||||
|
@ -324,7 +324,6 @@ begin
|
||||
//debugln(['TIDETodoWindow.SetOwnerFilename ',AValue]);
|
||||
if fOwnerFilename=AValue then exit;
|
||||
fOwnerFilename:=AValue;
|
||||
Caption:=lisTodoListCaption+' '+fOwnerFilename;
|
||||
acRefresh.Execute;
|
||||
end;
|
||||
|
||||
@ -645,9 +644,14 @@ begin
|
||||
if i=Owners.Count then
|
||||
CurOwner:=nil;// no appropriate owner found
|
||||
end;
|
||||
if CurOwner=nil then begin
|
||||
CurProject:=LazarusIDE.ActiveProject;
|
||||
CurOwner:=CurProject;
|
||||
end;
|
||||
|
||||
if CurProject<>nil then begin
|
||||
// scan all units of project
|
||||
Caption:=lisTodoListCaption+' '+CurProject.ProjectInfoFile;
|
||||
FBaseDirectory:=ExtractFilePath(CurProject.ProjectInfoFile);
|
||||
for i:=0 to CurProject.FileCount-1 do begin
|
||||
CurProjFile:=CurProject.Files[i];
|
||||
@ -655,9 +659,9 @@ begin
|
||||
and FilenameIsPascalUnit(CurProjFile.Filename) then
|
||||
ScanFile(CurProjFile.Filename);
|
||||
end;
|
||||
end;
|
||||
if CurPackage<>nil then begin
|
||||
end else if CurPackage<>nil then begin
|
||||
// scan all units of package
|
||||
Caption:=lisTodoListCaption+' '+CurPackage.Filename;
|
||||
FBaseDirectory:=ExtractFilePath(CurPackage.Filename);
|
||||
for i:=0 to CurPackage.FileCount-1 do begin
|
||||
CurPkgFile:=CurPackage.Files[i];
|
||||
|
Loading…
Reference in New Issue
Block a user