mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 09:29:27 +02:00
IDE: default loaded unit: check if file exists
git-svn-id: trunk@40190 -
This commit is contained in:
parent
f8c92431ec
commit
d1f1fbe675
@ -3329,11 +3329,13 @@ var
|
||||
if BestUnitInfo=nil then begin
|
||||
AnUnitInfo:=FirstPartOfProject;
|
||||
while AnUnitInfo<>nil do begin
|
||||
if (BestUnitInfo=nil)
|
||||
or (FilenameIsPascalUnit(AnUnitInfo.Filename)
|
||||
and (not FilenameIsPascalUnit(BestUnitInfo.Filename)))
|
||||
then begin
|
||||
BestUnitInfo:=AnUnitInfo;
|
||||
if FileExistsCached(AnUnitInfo.Filename) then begin
|
||||
if (BestUnitInfo=nil)
|
||||
or (FilenameIsPascalUnit(AnUnitInfo.Filename)
|
||||
and (not FilenameIsPascalUnit(BestUnitInfo.Filename)))
|
||||
then begin
|
||||
BestUnitInfo:=AnUnitInfo;
|
||||
end;
|
||||
end;
|
||||
AnUnitInfo:=AnUnitInfo.NextPartOfProject;
|
||||
end;
|
||||
|
@ -1799,7 +1799,7 @@ begin
|
||||
end
|
||||
else begin
|
||||
// reopen file
|
||||
// This will adjust Page/WindowIndex if they are not continious
|
||||
// This will adjust Page/WindowIndex if they are not continous
|
||||
Result:=OpenEditorFile(AnUnitInfo.Filename, -1, AnEditorInfo.WindowID,
|
||||
AnEditorInfo, [ofProjectLoading,ofMultiOpen,ofOnlyIfExists], True);
|
||||
if Result=mrAbort then
|
||||
|
Loading…
Reference in New Issue
Block a user