mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: the issue that original file list and new file list competed for updates when changing folders in FileView
it's because the original file list was not cleared, and there was another update before the new file list was loaded
This commit is contained in:
parent
714d00fcec
commit
76e7585c30
1 changed files with 17 additions and 3 deletions
|
|
@ -386,6 +386,7 @@ type
|
|||
|
||||
destructor Destroy; override;
|
||||
procedure Clear;
|
||||
procedure clearFilesOnly;
|
||||
|
||||
function Clone({%H-}NewParent: TWinControl): TFileView; virtual;
|
||||
procedure CloneTo(AFileView: TFileView); virtual;
|
||||
|
|
@ -1041,15 +1042,22 @@ begin
|
|||
HashFileList;
|
||||
end;
|
||||
|
||||
procedure TFileView.clearFilesOnly;
|
||||
begin
|
||||
if Assigned(FFiles) then
|
||||
FFiles.Clear;
|
||||
if Assigned(FAllDisplayFiles) then
|
||||
FAllDisplayFiles.Clear;
|
||||
HashFileList;
|
||||
end;
|
||||
|
||||
procedure TFileView.ClearFiles;
|
||||
begin
|
||||
if Assigned(FAllDisplayFiles) then
|
||||
begin
|
||||
ClearRecentlyUpdatedFiles;
|
||||
ClearPendingFilesChanges;
|
||||
FFiles.Clear;
|
||||
FAllDisplayFiles.Clear; // Clear references to files from the source.
|
||||
HashFileList;
|
||||
clearFilesOnly;
|
||||
Notify([fvnDisplayFileListChanged]);
|
||||
end;
|
||||
end;
|
||||
|
|
@ -3039,6 +3047,8 @@ begin
|
|||
|
||||
EnableWatcher(False);
|
||||
|
||||
clearFilesOnly;
|
||||
|
||||
FHistory.Add(aFileSource, aPath);
|
||||
|
||||
AfterChangePath;
|
||||
|
|
@ -3095,6 +3105,8 @@ begin
|
|||
|
||||
EnableWatcher(False);
|
||||
|
||||
clearFilesOnly;
|
||||
|
||||
FHistory.DeleteFromCurrentFileSource;
|
||||
|
||||
AfterChangePath;
|
||||
|
|
@ -3574,6 +3586,8 @@ begin
|
|||
FileSource.RemoveEventListener(@FileSourceEventListener);
|
||||
EnableWatcher(False);
|
||||
|
||||
clearFilesOnly;
|
||||
|
||||
FHistory.SetIndexes(aFileSourceIndex, aPathIndex);
|
||||
|
||||
if Assigned(FileSource) and IsNewFileSource then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue