Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
salvadorbs committed Sep 26, 2024
1 parent 144c590 commit 11c0b27
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Source/VirtualTrees.BaseTree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10161,8 +10161,10 @@ function TBaseVirtualTree.DetermineScrollDirections(X, Y: TDimension): TScrollDi
if ((Int64(timeGetTime) - FDragScrollStart) < FAutoScrollDelay) then
Result := [];
end
{$ifdef DEBUG_VTV}
else
OutputDebugString('Ooops');
Logger.DebugLn([lcDrag],'Ooops');
{$endif}
end;
end;
end;
Expand Down
22 changes: 11 additions & 11 deletions Source/VirtualTrees.Header.pas
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ TVTHeaderClass = class of TVTHeader;
implementation

uses
System.Generics.Defaults,
Generics.Defaults, Generics.Collections,
VirtualTrees, VirtualTrees.BaseTree, Math, Forms, VirtualTrees.Utils, VirtualTrees.HeaderPopup, GraphUtil;

type
Expand Down Expand Up @@ -4634,7 +4634,14 @@ procedure TVirtualTreeColumns.DrawButtonText(DC : HDC; Caption : string; Bounds
end;
end;

//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------

function TVirtualTreeColumnCompare(constref A, B: TVirtualTreeColumn): Integer;
begin
Result := CompareValue(A.Position, B.Position);
if Result = 0 then
Result := CompareValue(A.Index, B.Index);
end;

procedure TVirtualTreeColumns.FixPositions;
// Fixes column positions after loading from DFM or Bidi mode change.
Expand All @@ -4649,14 +4656,7 @@ procedure TVirtualTreeColumns.FixPositions;
LColumnsByPos.Add(Items[I]);

LColumnsByPos.Sort(
TComparer<TVirtualTreeColumn>.Construct(
function(const A, B: TVirtualTreeColumn): Integer
begin
Result := CompareValue(A.Position, B.Position);
if Result = 0 then
Result := CompareValue(A.Index, B.Index);
end)
);
TComparer<TVirtualTreeColumn>.Construct(TVirtualTreeColumnCompare));

for I := 0 to LColumnsByPos.Count-1 do
begin
Expand Down Expand Up @@ -4945,7 +4945,7 @@ procedure TVirtualTreeColumns.InitializePositionArray;

//----------------------------------------------------------------------------------------------------------------------

procedure TVirtualTreeColumns.Notify(Item : TCollectionItem; Action : TCollectionNotification);
procedure TVirtualTreeColumns.Notify(Item : TCollectionItem; Action : Classes.TCollectionNotification);
var
I : Integer;
lRemovedPosition: TColumnPosition;
Expand Down
4 changes: 1 addition & 3 deletions Source/VirtualTrees.Types.pas
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@ interface
{$EXTERNALSYM LIS_SELECTEDNOTFOCUS}

type
TDimension = Integer;
TNodeHeight = Single;
TDimension = Integer;
PDimension = ^Integer;
TNodeHeight = NativeInt;
//TVTCursor = LCLType.HCURSOR;
IDataObject= WinApi.ActiveX.IDataObject;
TVTDragDataObject = IDataObject;
TVTBackground = TPicture;
TVTPaintContext = HDC;
Expand Down

0 comments on commit 11c0b27

Please sign in to comment.