mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-16 14:19:15 +02:00
IDE: Update source editor window caption after saving a file. Issue #41645.
This commit is contained in:
parent
de12e8ae7b
commit
f70d066373
@ -948,6 +948,7 @@ type
|
||||
procedure MoveEditor(OldPageIndex, NewWindowIndex, NewPageIndex: integer);
|
||||
procedure AddControlToEditor(aSourceEditor : TSourceEditorInterface; aControl : TControl; aAlign : TAlign); override;
|
||||
|
||||
procedure UpdateCaption;
|
||||
procedure UpdateStatusBar;
|
||||
function AddStatusPanel(AnOwner: TClass; ATag: PtrUInt = 0): TSourceEditorStatusPanelInterface; override;
|
||||
function StatusPanelCount(AnOwner: TClass): integer; override;
|
||||
@ -8238,13 +8239,7 @@ begin
|
||||
PageIndex := i;
|
||||
dec(FFocusLock);
|
||||
SourceEditorManager.ActiveSourceWindow := Self;
|
||||
if EditorOpts.ShowFileNameInCaption then
|
||||
begin
|
||||
if ActiveEditor<>nil then
|
||||
Caption := BaseCaption+' - '+ActiveEditor.FileName
|
||||
else
|
||||
Caption := BaseCaption;
|
||||
end;
|
||||
UpdateCaption;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.SetBaseCaption(AValue: String);
|
||||
@ -9336,6 +9331,17 @@ begin
|
||||
GetActiveSE.IsLocked := not GetActiveSE.IsLocked;
|
||||
end;
|
||||
}
|
||||
procedure TSourceNotebook.UpdateCaption;
|
||||
begin
|
||||
if EditorOpts.ShowFileNameInCaption then
|
||||
begin
|
||||
if ActiveEditor<>nil then
|
||||
Caption := BaseCaption+' - '+ActiveEditor.FileName
|
||||
else
|
||||
Caption := BaseCaption;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.UpdateStatusBar;
|
||||
var
|
||||
tempEditor: TSourceEditor;
|
||||
|
@ -2916,6 +2916,7 @@ begin
|
||||
MainIDE.UpdateSaveMenuItemsAndButtons(not (sfProjectSaving in Flags));
|
||||
end;
|
||||
TSourceEditor(AEditor).SourceNotebook.UpdateStatusBar;
|
||||
TSourceEditor(AEditor).SourceNotebook.UpdateCaption;
|
||||
|
||||
// fix all references
|
||||
if not (sfSkipReferences in Flags) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user