diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a4f6f74..d5eb36f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.9.10-dev + +## Bugs fixed + +- Editor tabs: caption not updated when split page is closed using the File menu or the shortcut. + # v3.9.9 ## Enhancement diff --git a/src/u_editor.pas b/src/u_editor.pas index ca927b75..a94e151b 100644 --- a/src/u_editor.pas +++ b/src/u_editor.pas @@ -291,7 +291,7 @@ begin with result do case index of 0: begin identifier := 'Select next page'; shortcut:= fNextPage; end; - 1: begin identifier := 'Select previous page'; shortcut:= fPrevPage; end; + 1: begin identifier := 'Select previous page'; shortcut:= fPrevPage; end; 2: begin identifier := 'Move page left'; shortcut:= fMoveLeft; end; 3: begin identifier := 'Move page right'; shortcut:= fMoveRight; end; else raise Exception.CreateFmt( @@ -502,6 +502,8 @@ begin end; procedure TEditorWidget.docClosing(document: TDexedMemo); +var + i: integer; begin if document.isNotAssigned then exit; @@ -509,6 +511,8 @@ begin if document = fDoc then fDoc := nil; pageControl.deletePage(pageControl.pageIndex); + for i:= 0 to pageControl.pageCount-1 do + updatePageCaption(pageControl.pages[i]); updateImperative; end; @@ -813,7 +817,7 @@ procedure TEditorWidget.updateStatusBar; const modstr: array[boolean] of string = ('...', 'MODIFIED'); begin - if fDoc = nil then + if fDoc.isNotAssigned then begin editorStatus.Panels[0].Text := ''; editorStatus.Panels[1].Text := ''; @@ -867,8 +871,7 @@ procedure TEditorWidget.PageControlButtonClick(sender: TObject; button: TPageCon var i: integer; begin - if ((button = pbClose) and (pageControl.currentPage = pageControl.splitPage)) - or (button = pbSplit) then + if (button = pbClose) or (button = pbSplit) then begin for i:= 0 to pageControl.pageCount-1 do updatePageCaption(pageControl.pages[i]); @@ -884,7 +887,7 @@ end; procedure TEditorWidget.updateDelayed; begin - if fDoc = nil then + if fDoc.isNotAssigned then exit; updateStatusBar; if not fKeyChanged then