Skip to content

Commit 6365165

Browse files
committed
Revert "Improved commit for #1146: Activate toAutoSort only on assignment of first event handler"
This reverts commit e2de0be.
1 parent 5fa59ba commit 6365165

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/VirtualTrees.BaseTree.pas

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5661,9 +5661,8 @@ procedure TBaseVirtualTree.SetOffsetY(const Value: TDimension);
56615661

56625662
procedure TBaseVirtualTree.SetOnCompareNodes(const Value: TVTCompareEvent);
56635663
begin
5664-
if Assigned(Value) and not Assigned(FOnCompareNodes) then
5665-
Self.TreeOptions.AutoOptions := TreeOptions.AutoOptions + [TVTAutoOption.toAutoSort]; // Turn on toAutoSort as soon as there is a compare function. See issue #1146
56665664
FOnCompareNodes := Value;
5665+
Self.TreeOptions.AutoOptions := TreeOptions.AutoOptions + [TVTAutoOption.toAutoSort]; // See issue #1146
56675666
end;
56685667

56695668
procedure TBaseVirtualTree.SetOnPrepareButtonImages(const Value: TVTPrepareButtonImagesEvent);

0 commit comments

Comments
 (0)