mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 16:20:22 +02:00
IDE: do not open lpr on codetools changes, bug #14693
git-svn-id: trunk@22135 -
This commit is contained in:
parent
41ff845357
commit
e9a1e8f8a1
@ -12330,6 +12330,13 @@ begin
|
||||
// open all sources in editor
|
||||
for i:=0 to Manager.SourceChangeCache.BuffersToModifyCount-1 do begin
|
||||
CodeBuf:=Manager.SourceChangeCache.BuffersToModify[i];
|
||||
|
||||
// do not open lpr file
|
||||
if (not OpenMainSourceOnCodeToolChange)
|
||||
and (Project1<>nil) and (Project1.MainUnitInfo<>nil)
|
||||
and (CompareFilenames(Project1.MainFilename,CodeBuf.Filename)=0) then
|
||||
continue;
|
||||
|
||||
//DebugLn(['TMainIDE.OnBeforeCodeToolBossApplyChanges i=',i,' ',CodeBUf.Filename]);
|
||||
Flags:=[ofOnlyIfExists,ofDoNotLoadResource];
|
||||
if CodeBuf.IsVirtual then
|
||||
|
@ -140,6 +140,7 @@ type
|
||||
FLazarusIDEHandlers: array[TLazarusIDEHandlerType] of TMethodList;
|
||||
FMainBarSubTitle: string;
|
||||
FOpenEditorsOnCodeToolChange: boolean;
|
||||
FOpenMainSourceOnCodeToolChange: boolean;
|
||||
procedure AddHandler(HandlerType: TLazarusIDEHandlerType;
|
||||
const AMethod: TMethod; AsLast: boolean = false);
|
||||
procedure RemoveHandler(HandlerType: TLazarusIDEHandlerType;
|
||||
@ -223,9 +224,10 @@ type
|
||||
procedure DoJumpToCodeToolBossError; virtual; abstract;
|
||||
function NeedSaveSourceEditorChangesToCodeCache(PageIndex: integer): boolean; virtual; abstract;
|
||||
function SaveSourceEditorChangesToCodeCache(PageIndex: integer): boolean; virtual; abstract; // true if something was saved
|
||||
property OpenEditorsOnCodeToolChange: boolean
|
||||
read FOpenEditorsOnCodeToolChange
|
||||
write FOpenEditorsOnCodeToolChange;
|
||||
property OpenEditorsOnCodeToolChange: boolean read FOpenEditorsOnCodeToolChange
|
||||
write FOpenEditorsOnCodeToolChange;
|
||||
property OpenMainSourceOnCodeToolChange: boolean read FOpenMainSourceOnCodeToolChange
|
||||
write FOpenMainSourceOnCodeToolChange;
|
||||
|
||||
// progress and error messages
|
||||
function ShowProgress(const SomeText: string;
|
||||
|
Loading…
Reference in New Issue
Block a user