mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 15:19:36 +01:00
fixed reopen for loaded but not editor opened files
git-svn-id: trunk@8306 -
This commit is contained in:
parent
4ce4d0a95b
commit
c9d605f092
@ -214,6 +214,7 @@ end;
|
||||
|
||||
procedure Tdlgpropertiesprinter.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
if Sender=nil then ;
|
||||
FPaperSizeOptions.Free;
|
||||
FMediaTypeOptions.Free;
|
||||
FInputSlotOptions.Free;
|
||||
|
||||
16
ide/main.pp
16
ide/main.pp
@ -455,7 +455,9 @@ type
|
||||
FCheckFilesOnDiskNeeded: boolean;
|
||||
FOpenEditorsOnCodeToolChange: boolean;
|
||||
|
||||
{$IFDEF DoNotUseProcessDebugger}
|
||||
FRunProcess: TProcess; // temp solution, will be replaced by dummydebugger
|
||||
{$ENDIF}
|
||||
|
||||
FRebuildingCompilerGraphCodeToolsDefinesNeeded: boolean;
|
||||
protected
|
||||
@ -5566,8 +5568,8 @@ var
|
||||
|
||||
begin
|
||||
{$IFDEF IDE_VERBOSE}
|
||||
writeln('');
|
||||
writeln('*** TMainIDE.DoOpenEditorFile START "',AFilename,'" ',OpenFlagsToString(Flags));
|
||||
DebugLn('');
|
||||
DebugLn('*** TMainIDE.DoOpenEditorFile START "',AFilename,'" ',OpenFlagsToString(Flags));
|
||||
{$ENDIF}
|
||||
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.DoOpenEditorFile START');{$ENDIF}
|
||||
Result:=mrCancel;
|
||||
@ -5652,7 +5654,9 @@ begin
|
||||
NewUnitInfo.IsPartOfProject:=true;
|
||||
Project1.Modified:=true;
|
||||
end;
|
||||
if (not (ofProjectLoading in Flags)) and NewUnitInfo.Loaded then begin
|
||||
if (not (ofProjectLoading in Flags)) and (NewUnitInfo.EditorIndex>=0) then
|
||||
begin
|
||||
//DebugLn('TMainIDE.DoOpenEditorFile file already open ',NewUnitInfo.Filename);
|
||||
// file already open -> change source notebook page
|
||||
SourceNoteBook.Notebook.PageIndex:=NewUnitInfo.EditorIndex;
|
||||
if ofDoLoadResource in Flags then
|
||||
@ -5732,6 +5736,7 @@ begin
|
||||
NewUnitInfo.FileReadOnly:=FileExists(NewUnitInfo.Filename)
|
||||
and (not FileIsWritable(NewUnitInfo.Filename));
|
||||
|
||||
|
||||
{$IFDEF IDE_DEBUG}
|
||||
writeln('[TMainIDE.DoOpenEditorFile] B');
|
||||
{$ENDIF}
|
||||
@ -7202,7 +7207,10 @@ end;
|
||||
|
||||
function TMainIDE.DoInitProjectRun: TModalResult;
|
||||
var
|
||||
ProgramFilename, WorkingDir: String;
|
||||
ProgramFilename: string;
|
||||
{$IFDEF DoNotUseProcessDebugger}
|
||||
WorkingDir: String;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if ToolStatus <> itNone
|
||||
then begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user