mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Fix: subtle synchronization issue related to Grids in DisplayFileListChanged()
This commit is contained in:
parent
c4ae646f00
commit
dc2d77a5bf
2 changed files with 10 additions and 5 deletions
|
|
@ -1009,10 +1009,13 @@ var
|
|||
begin
|
||||
ScrollTo := IsActiveFileVisible;
|
||||
|
||||
// Update grid row count.
|
||||
SetRowCount(FFiles.Count);
|
||||
// Row count updates and Content updates should be grouped in one transaction
|
||||
// otherwise, Grids may have subtle synchronization issues.
|
||||
dgPanel.BeginUpdate;
|
||||
SetRowCount(FFiles.Count); // Update grid row count.
|
||||
SetFilesDisplayItems;
|
||||
RedrawFiles;
|
||||
dgPanel.EndUpdate;
|
||||
|
||||
if SetActiveFileNow(RequestedActiveFile, True, FLastTopRowIndex) then
|
||||
RequestedActiveFile := ''
|
||||
|
|
|
|||
|
|
@ -576,12 +576,14 @@ var
|
|||
begin
|
||||
ScrollTo := IsActiveFileVisible;
|
||||
|
||||
// Update grid col and row count
|
||||
dgPanel.SetColRowCount(FFiles.Count);
|
||||
|
||||
// Row count updates and Content updates should be grouped in one transaction
|
||||
// otherwise, Grids may have subtle synchronization issues.
|
||||
dgPanel.BeginUpdate;
|
||||
dgPanel.SetColRowCount(FFiles.Count); // Update grid col and row count
|
||||
dgPanel.CalculateColRowCount;
|
||||
dgPanel.CalculateColumnWidth;
|
||||
SetFilesDisplayItems;
|
||||
dgPanel.EndUpdate;
|
||||
|
||||
if SetActiveFileNow(RequestedActiveFile, True, FLastTopRowIndex) then
|
||||
RequestedActiveFile := ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue