mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:49:15 +02:00
IDE: fixed loading default unit when no lps exists
git-svn-id: trunk@46778 -
This commit is contained in:
parent
001b440270
commit
ba6f0da620
@ -1030,7 +1030,7 @@ type
|
|||||||
function GetCompileSourceFilename: string;
|
function GetCompileSourceFilename: string;
|
||||||
procedure AutoAddOutputDirToIncPath;
|
procedure AutoAddOutputDirToIncPath;
|
||||||
|
|
||||||
// state file
|
// compile state file
|
||||||
function LoadStateFile(IgnoreErrors: boolean): TModalResult;
|
function LoadStateFile(IgnoreErrors: boolean): TModalResult;
|
||||||
function SaveStateFile(const CompilerFilename, CompilerParams: string;
|
function SaveStateFile(const CompilerFilename, CompilerParams: string;
|
||||||
Complete: boolean): TModalResult;
|
Complete: boolean): TModalResult;
|
||||||
@ -5684,7 +5684,10 @@ var
|
|||||||
AnUnitInfo: TUnitInfo;
|
AnUnitInfo: TUnitInfo;
|
||||||
BestUnitInfo: TUnitInfo;
|
BestUnitInfo: TUnitInfo;
|
||||||
begin
|
begin
|
||||||
if FirstUnitWithEditorIndex<>nil then exit;
|
BestUnitInfo:=FirstUnitWithEditorIndex;
|
||||||
|
if (BestUnitInfo<>nil) and (BestUnitInfo.Loaded)
|
||||||
|
and FileExistsCached(BestUnitInfo.Filename) then
|
||||||
|
exit;
|
||||||
BestUnitInfo:=nil;
|
BestUnitInfo:=nil;
|
||||||
|
|
||||||
if (MainUnitID>=0) then begin
|
if (MainUnitID>=0) then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user