found bug, status bar displays wrong doc name under certain circumstances

This commit is contained in:
Basile Burg 2015-01-16 00:07:26 +01:00
parent 7a2a57d0fa
commit c1a0ed2799
2 changed files with 26 additions and 0 deletions

View File

@ -131,12 +131,15 @@ procedure TCEEditorWidget.docClosing(aDoc: TCESynMemo);
begin
if fDoc <> aDoc then exit;
fDoc := nil;
PageControl.Update;
UpdateByEvent;
end;
procedure TCEEditorWidget.docFocused(aDoc: TCESynMemo);
begin
fDoc := aDoc;
focusedEditorChanged;
beginUpdateByDelay;
UpdateByEvent;
end;
@ -184,6 +187,7 @@ end;
procedure TCEEditorWidget.PageControlChange(Sender: TObject);
begin
UpdateByEvent;
end;
procedure TCEEditorWidget.completionExecute(Sender: TObject);

View File

@ -83,6 +83,10 @@ type
procedure saveCache;
procedure loadCache;
protected
// TODO-cbugfix: open tree files, close the one at the center, select the left one, select the right one: the status bar displays the onfo from the left editor (sel count, pos, filename)
// however this is only a visual bug: saving works on the right editor...
procedure VisibleChanged; override;
procedure SetVisible(Value: Boolean); override;
procedure SetHighlighter(const Value: TSynCustomHighlighter); override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
@ -361,6 +365,24 @@ begin
subjDocFocused(TCEMultiDocSubject(fMultiDocSubject), self);
end;
procedure TCESynMemo.SetVisible(Value: Boolean);
begin
inherited;
if not Value then exit;
checkFileDate;
identifierToD2Syn;
subjDocFocused(TCEMultiDocSubject(fMultiDocSubject), self);
end;
procedure TCESynMemo.VisibleChanged;
begin
inherited;
if not Visible then exit;
checkFileDate;
identifierToD2Syn;
subjDocFocused(TCEMultiDocSubject(fMultiDocSubject), self);
end;
procedure TCESynMemo.UpdateShowing;
begin
inherited;