From 661e18eb9f58ef54bc19fb4276706767737f08b1 Mon Sep 17 00:00:00 2001 From: lazarus Date: Thu, 16 May 2002 15:51:49 +0000 Subject: [PATCH] MG: closing editor now switches to left editor git-svn-id: trunk@1688 - --- ide/main.pp | 5 ++++- ide/uniteditor.pp | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ide/main.pp b/ide/main.pp index 55c4aa2d75..5d9878e044 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -3568,7 +3568,7 @@ begin Project1.RemoveUnit(i); end; -writeln('TMainIDE.DoCloseEditorUnit end'); + writeln('TMainIDE.DoCloseEditorUnit end'); Result:=mrOk; end; @@ -6372,6 +6372,9 @@ end. { ============================================================================= $Log$ + Revision 1.298 2002/05/16 15:51:48 lazarus + MG: closing editor now switches to left editor + Revision 1.297 2002/05/16 14:35:19 lazarus MG: fixed codetools error jumping diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index e2090b930b..32412770b1 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -2850,6 +2850,9 @@ writeln('TSourceNotebook.CloseFile A PageIndex=',PageIndex); if Notebook.Pages.Count>1 then begin //writeln('TSourceNotebook.CloseFile B PageIndex=',PageIndex); Notebook.Pages.Delete(PageIndex); + // switch to left PageIndex + if PageIndex>0 then + Notebook.PageIndex:=PageIndex-1; //writeln('TSourceNotebook.CloseFile C PageIndex=',PageIndex); UpdateStatusBar; end else begin