Skip to content

Commit 86a537a

Browse files
committed
Fixes #1197
Fixes 'Selected count is not always correct'
1 parent f9fe7df commit 86a537a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Source/VirtualTrees.BaseTree.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13440,6 +13440,8 @@ procedure TBaseVirtualTree.InternalRemoveFromSelection(Node: PVirtualNode);
1344013440
if SyncCheckstateWithSelection[Node] then
1344113441
Node.CheckState := csUncheckedNormal; // Avoid using SetCheckState() as it handles toSyncCheckboxesWithSelection as well.
1344213442
System.Inc(PAnsiChar(FSelection[Index]));
13443+
// update selection count
13444+
System.Dec(FSelectionCount); // Fixes #1197
1344313445
DoRemoveFromSelection(Node);
1344413446
Change(Node); // Calling Change() here fixes issue #1047
1344513447
end;

0 commit comments

Comments
 (0)