mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 09:12:35 +02:00
IDE: when there is no lps file: open the main unit if it does not contain automatic statements
git-svn-id: trunk@22938 -
This commit is contained in:
parent
1efc58041e
commit
ca869ce1fc
@ -2447,9 +2447,18 @@ var
|
||||
BestUnitInfo: TUnitInfo;
|
||||
begin
|
||||
if FirstUnitWithEditorIndex<>nil then exit;
|
||||
|
||||
AnUnitInfo:=FirstPartOfProject;
|
||||
|
||||
BestUnitInfo:=nil;
|
||||
|
||||
if (MainUnitID>=0)
|
||||
and ([pfMainUnitHasCreateFormStatements,pfMainUnitHasTitleStatement]*Flags=[])
|
||||
then begin
|
||||
// the main unit contains no automatic statements
|
||||
// open the main unit
|
||||
BestUnitInfo:=MainUnitInfo;
|
||||
end;
|
||||
|
||||
AnUnitInfo:=FirstPartOfProject;
|
||||
while AnUnitInfo<>nil do begin
|
||||
if (BestUnitInfo=nil)
|
||||
or (FilenameIsPascalUnit(AnUnitInfo.Filename)
|
||||
|
Loading…
Reference in New Issue
Block a user