Skip to content

Commit

Permalink
Fixed issue #723: Turn event OnAfterNodeExport into a procedure. This…
Browse files Browse the repository at this point in the history
… is a breaking chnage.
  • Loading branch information
Joachim Marder committed Oct 29, 2017
1 parent 069687f commit bb6b9e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Source/VirtualTrees.Export.pas
Expand Up @@ -305,11 +305,12 @@ TCustomVirtualStringTreeCracker = class(TCustomVirtualStringTree)
Run := Save;
while Assigned(Run) and not CrackTree.OperationCanceled do
begin
if ((not CrackTree.CanExportNode(Run)) or (Assigned(CrackTree.OnBeforeNodeExport) and (not CrackTree.OnBeforeNodeExport(CrackTree, etHTML, Run)))) then
if ((not CrackTree.CanExportNode(Run)) or Assigned(CrackTree.OnBeforeNodeExport)) then
begin
Run := GetNextNode(Run);
Continue;
end;
CrackTree.OnBeforeNodeExport(CrackTree, etHTML, Run);
Level := CrackTree.GetNodeLevel(Run);
Buffer.Add(' <tr class="default">');
Buffer.AddNewLine;
Expand Down Expand Up @@ -678,12 +679,12 @@ function ContentToRTF(Tree: TCustomVirtualStringTree; Source: TVSTTextSourceType
Run := Save;
while Assigned(Run) and not CrackTree.OperationCanceled do
begin
if ((not CrackTree.CanExportNode(Run)) or
(Assigned(CrackTree.OnBeforeNodeExport) and (not CrackTree.OnBeforeNodeExport(CrackTree, etRTF, Run)))) then
if ((not CrackTree.CanExportNode(Run)) or Assigned(CrackTree.OnBeforeNodeExport)) then
begin
Run := GetNextNode(Run);
Continue;
end;
CrackTree.OnBeforeNodeExport(CrackTree, etRTF, Run);
I := 0;
while not RenderColumns or (I < Length(Columns)) do
begin
Expand Down
2 changes: 1 addition & 1 deletion Source/VirtualTrees.pas
Expand Up @@ -1593,7 +1593,7 @@ THeaderPaintInfo = record
etCustom // supported by external tools
);

TVTNodeExportEvent = function (Sender: TBaseVirtualTree; aExportType: TVTExportType; Node: PVirtualNode): Boolean of object;
TVTNodeExportEvent = procedure (Sender: TBaseVirtualTree; aExportType: TVTExportType; Node: PVirtualNode) of object;
TVTColumnExportEvent = procedure (Sender: TBaseVirtualTree; aExportType: TVTExportType; Column: TVirtualTreeColumn) of object;
TVTTreeExportEvent = procedure(Sender: TBaseVirtualTree; aExportType: TVTExportType) of object;

Expand Down

0 comments on commit bb6b9e1

Please sign in to comment.