mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 03:58:09 +02:00
IdeIntf: New property CheckFilesOnDiskEnabled. Issue #32612, patch from Pascal Riekenberg.
git-svn-id: trunk@56204 -
This commit is contained in:
parent
125d8c00d4
commit
f58106b6e4
@ -273,6 +273,7 @@ type
|
||||
FOpenEditorsOnCodeToolChange: boolean;
|
||||
FOpenMainSourceOnCodeToolChange: boolean;
|
||||
FSaveClosedSourcesOnCodeToolChange: boolean;
|
||||
FCheckFilesOnDiskEnabled: boolean;
|
||||
procedure AddHandler(HandlerType: TLazarusIDEHandlerType;
|
||||
const AMethod: TMethod; AsLast: boolean = false);
|
||||
procedure RemoveHandler(HandlerType: TLazarusIDEHandlerType;
|
||||
@ -534,6 +535,7 @@ type
|
||||
property IDEIsClosing: boolean read FIDEIsClosing;
|
||||
property LastActivatedWindows: TFPList read FLastActivatedWindows;
|
||||
property LastFormActivated: TCustomForm read FLastFormActivated write FLastFormActivated;
|
||||
property CheckFilesOnDiskEnabled: boolean read FCheckFilesOnDiskEnabled write FCheckFilesOnDiskEnabled;
|
||||
end;
|
||||
|
||||
{ TIDETabMaster }
|
||||
@ -716,6 +718,7 @@ end;
|
||||
constructor TLazIDEInterface.Create(TheOwner: TComponent);
|
||||
begin
|
||||
LazarusIDE:=Self;
|
||||
FCheckFilesOnDiskEnabled:=True;
|
||||
inherited Create(TheOwner);
|
||||
end;
|
||||
|
||||
|
@ -2026,7 +2026,7 @@ begin
|
||||
if IDEIsClosing then Exit;
|
||||
FIDEIsClosing := True;
|
||||
CanClose := False;
|
||||
SourceFileMgr.CheckingFilesOnDisk := True;
|
||||
CheckFilesOnDiskEnabled := False;
|
||||
try
|
||||
if (ToolStatus = itExiting) then exit;
|
||||
|
||||
@ -2047,7 +2047,7 @@ begin
|
||||
CanClose:=(DoCloseProject <> mrAbort);
|
||||
finally
|
||||
FIDEIsClosing := CanClose;
|
||||
SourceFileMgr.CheckingFilesOnDisk:=false;
|
||||
CheckFilesOnDiskEnabled:=True;
|
||||
if not CanClose then
|
||||
DoCheckFilesOnDisk(false);
|
||||
end;
|
||||
|
@ -169,7 +169,6 @@ type
|
||||
private
|
||||
FProject: TProject;
|
||||
FListForm: TGenericCheckListForm;
|
||||
FCheckingFilesOnDisk: boolean;
|
||||
FCheckFilesOnDiskNeeded: boolean;
|
||||
function AskToSaveEditors(EditorList: TList): TModalResult;
|
||||
function AddPathToBuildModes(aPath, CurDirectory: string; IsIncludeFile: Boolean): Boolean;
|
||||
@ -325,11 +324,9 @@ type
|
||||
procedure UpdateProjectResourceInfo;
|
||||
public
|
||||
function AskSaveProject(const ContinueText, ContinueBtn: string): TModalResult;
|
||||
|
||||
function SaveSourceEditorChangesToCodeCache(AEditor: TSourceEditorInterface): boolean;
|
||||
public
|
||||
function CheckFilesOnDisk(Instantaneous: boolean = false): TModalResult;
|
||||
property CheckingFilesOnDisk: boolean read FCheckingFilesOnDisk write FCheckingFilesOnDisk;
|
||||
property CheckFilesOnDiskNeeded: boolean read FCheckFilesOnDiskNeeded;
|
||||
end;
|
||||
|
||||
@ -3345,7 +3342,7 @@ var
|
||||
CurUnit: TUnitInfo;
|
||||
begin
|
||||
Result:=mrOk;
|
||||
if FCheckingFilesOnDisk then exit;
|
||||
if not MainIDE.CheckFilesOnDiskEnabled then exit;
|
||||
if Project1=nil then exit;
|
||||
if Screen.GetCurrentModalForm<>nil then exit;
|
||||
|
||||
@ -3355,7 +3352,7 @@ begin
|
||||
end;
|
||||
FCheckFilesOnDiskNeeded:=false;
|
||||
|
||||
FCheckingFilesOnDisk:=true;
|
||||
MainIDE.CheckFilesOnDiskEnabled:=False;
|
||||
AnUnitList:=nil;
|
||||
APackageList:=nil;
|
||||
AIgnoreList:=nil;
|
||||
@ -3422,7 +3419,7 @@ begin
|
||||
|
||||
Result:=mrOk;
|
||||
finally
|
||||
FCheckingFilesOnDisk:=false;
|
||||
MainIDE.CheckFilesOnDiskEnabled:=True;
|
||||
AnUnitList.Free;
|
||||
APackageList.Free;
|
||||
AIgnoreList.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user