FIX: Bug [0001417] Changed sorting settings aren't applied immediately

This commit is contained in:
Alexander Koblov 2024-01-12 22:01:43 +03:00
commit 285bb31d19
2 changed files with 24 additions and 2 deletions

View file

@ -449,7 +449,7 @@ type
procedure SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode; ASaveHistory:boolean); virtual;
procedure UpdateView;
procedure ApplySettings;
procedure UpdateColor; virtual; abstract;
{en
@ -2887,6 +2887,20 @@ begin
UpdateTitle;
end;
procedure TFileView.ApplySettings;
var
Index: Integer;
begin
SortAllDisplayFiles;
ReDisplayFileList;
for Index := 0 to FFiles.Count - 1 do
begin
FFiles[Index].TextColor := clNone;
end;
Notify([fvnVisibleFilePropertiesChanged]);
end;
function TFileView.BeforeChangePath(NewFileSource: IFileSource;
Reason: TChangePathReason; NewPath: String): Boolean;
var

View file

@ -5388,8 +5388,16 @@ procedure TfrmMain.UpdateWindowView;
if FInitializedView then
begin
for I := 0 to NoteBook.PageCount - 1 do // change on all tabs
// Update all tabs
for I := 0 to NoteBook.PageCount - 1 do
begin
NoteBook.View[I].UpdateView;
end;
// Update active tab
if Assigned(NoteBook.ActiveView) then
begin
NoteBook.ActiveView.ApplySettings;
end;
end;
end;