File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,9 @@ EVirtualTreeError = class(Exception);
584
584
TVTExportMode = (
585
585
emAll, // export all records (regardless checked state)
586
586
emChecked, // export checked records only
587
- emUnchecked // export unchecked records only
587
+ emUnchecked, // export unchecked records only
588
+ emVisibleDueToExpansion, //Do not export nodes that are not visible because their parent is not expanded
589
+ emSelected // export selected nodes only
588
590
);
589
591
590
592
// Kinds of operations
@@ -36711,15 +36713,20 @@ function TCustomVirtualStringTree.ContentToHTML(Source: TVSTTextSourceType; Capt
36711
36713
36712
36714
//----------------------------------------------------------------------------------------------------------------------
36713
36715
36714
- function TCustomVirtualStringTree.CanExportNode(Node: PVirtualNode ): Boolean;
36716
+ function TCustomVirtualStringTree.CanExportNode(Node: PVirtualNode): Boolean;
36715
36717
36716
36718
begin
36717
- Result := True;
36718
36719
case FOptions.ExportMode of
36719
36720
emChecked:
36720
36721
Result := Node.CheckState = csCheckedNormal;
36721
36722
emUnchecked:
36722
36723
Result := Node.CheckState = csUncheckedNormal;
36724
+ emVisibleDueToExpansion: //Do not export nodes that are not visible because their parent is not expanded
36725
+ Result := not Assigned(Node.Parent) or Self.Expanded[Node.Parent];
36726
+ emSelected: // export selected nodes only
36727
+ Result := Selected[Node];
36728
+ else
36729
+ Result := True;
36723
36730
end;
36724
36731
end;
36725
36732
You can’t perform that action at this time.
0 commit comments