Skip to content

Commit

Permalink
Enable lazy loading of bundle treeview nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ElektroKill committed Jun 17, 2023
1 parent 87f678d commit 02d7a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dnSpy/dnSpy/Documents/TreeView/BundleDocumentNodeImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ sealed class BundleDocumentNodeImpl : BundleDocumentNode {
public BundleDocumentNodeImpl(IDsDocument document) : base(document) { }

public override Guid Guid => new Guid(DocumentTreeViewConstants.BUNDLE_NODE_GUID);

protected override ImageReference GetIcon(IDotNetImageService dnImgMgr) => dnImgMgr.GetImageReference(Document.PEImage!);
public override void Initialize() => TreeNode.LazyLoading = true;

public override IEnumerable<TreeNodeData> CreateChildren() {
Debug2.Assert(Document.SingleFileBundle is not null);
Expand Down
1 change: 1 addition & 0 deletions dnSpy/dnSpy/Documents/TreeView/BundleFolderNodeImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sealed class BundleFolderNodeImpl : BundleFolderNode {
protected override ImageReference GetIcon(IDotNetImageService dnImgMgr) => DsImages.FolderClosed;
protected override ImageReference? GetExpandedIcon(IDotNetImageService dnImgMgr) => DsImages.FolderOpened;
public override NodePathName NodePathName => new NodePathName(Guid);
public override void Initialize() => TreeNode.LazyLoading = true;

readonly BundleFolder bundleFolder;
readonly BundleDocumentNode owner;
Expand Down

0 comments on commit 02d7a63

Please sign in to comment.