Skip to content

Commit

Permalink
Fixed issue #1248, Fixed compiler warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Apr 8, 2024
1 parent e8f3263 commit 49c9364
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/VirtualTrees.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,6 @@ TBaseVirtualTree = class(TCustomControl)
procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED;
procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;
function GetRangeX: Cardinal;
function GetDoubleBuffered: Boolean;
procedure SetDoubleBuffered(const Value: Boolean);
function GetVclStyleEnabled: Boolean; inline;
procedure SetOnPrepareButtonImages(const Value: TVTPrepareButtonImagesEvent);
Expand Down Expand Up @@ -2721,6 +2720,7 @@ TBaseVirtualTree = class(TCustomControl)
ImgCheckState: TCheckState = csUncheckedNormal; ImgEnabled: Boolean = True): Integer; virtual;
function GetColumnClass: TVirtualTreeColumnClass; virtual;
function GetDefaultHintKind: TVTHintKind; virtual;
function GetDoubleBuffered: Boolean; {$if CompilerVersion >= 36} override; {$ifend}
function GetHeaderClass: TVTHeaderClass; virtual;
function GetHintWindowClass: THintWindowClass; virtual;
procedure GetImageIndex(var Info: TVTPaintInfo; Kind: TVTImageKind; InfoIndex: TVTImageInfoIndex); virtual;
Expand Down Expand Up @@ -17823,6 +17823,12 @@ procedure TBaseVirtualTree.WMPrintClient(var Message: TWMPrintClient);
Canvas: TCanvas;

begin
if RTLVersion >= 36 then // see issue #1248, for newer Delphi versions use inherited version of WMPrintClient()
begin
inherited;
exit;
end;

// Draw only if the window is visible or visibility is not required.
if ((Message.Flags and PRF_CHECKVISIBLE) = 0) or IsWindowVisible(Handle) then
begin
Expand Down

0 comments on commit 49c9364

Please sign in to comment.