Skip to content

Conversation

@tom-englert
Copy link
Contributor

@tom-englert tom-englert commented Oct 6, 2024

Fix #3293

…ed in the left-hand tree => start decompile with no content to finally show an empty panel.
@siegfriedpammer siegfriedpammer merged commit b7f0ab3 into icsharpcode:master Oct 6, 2024
@siegfriedpammer
Copy link
Member

I think I fixed the other issue in 916a3fa... Also I noticed that we are calling SelectNode(Root) at https://github.com/icsharpcode/ILSpy/blob/master/ILSpy/AssemblyTree/AssemblyTreeModel.cs#L416

@tom-englert is that something you added or did we do that already in the past? I noticed this, while testing my fix and I can't remember to have ever seen the output of AssemblyListTreeNode.Decompile (aka the root) in action :)... Would it make more sense to select the first assembly in the list and show its decompilation?

@tom-englert
Copy link
Contributor Author

I didn't change that, it was the same before:

ILSpy/ILSpy/MainWindow.xaml.cs

Lines 1005 to 1014 in cf4f68b

public void ShowAssemblyList(string name)
{
AssemblyList list = this.AssemblyListManager.LoadList(name);
//Only load a new list when it is a different one
if (list.ListName != CurrentAssemblyList.ListName)
{
ShowAssemblyList(list);
SelectNode(AssemblyTreeView.Root);
}
}

And yes, selecting the first assembly sounds more reasonable, I'll change that.

@tom-englert
Copy link
Contributor Author

The old code had so many side effects, maybe this one also was obscured by another side effect?

@siegfriedpammer
Copy link
Member

The old code had so many side effects, maybe this one also was obscured by another side effect?

Yeah, that's highly likely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Right panel shows old info in case all is deleted in the left-hand tree

2 participants