diff --git a/ILSpy.Tests/SessionSettingsTests.cs b/ILSpy.Tests/SessionSettingsTests.cs index 45f7a26b6..94ee26235 100644 --- a/ILSpy.Tests/SessionSettingsTests.cs +++ b/ILSpy.Tests/SessionSettingsTests.cs @@ -54,4 +54,19 @@ public class SessionSettingsTests loaded.WindowPosition.Should().Be(new PixelPoint(200, 300)); loaded.WindowSize.Should().Be(new Size(1024, 768)); } + + [Test] + public void Save_then_Load_round_trips_ActiveTreeViewPath() + { + var original = new SessionSettings { + ActiveTreeViewPath = ["My.Assembly.dll", "MyNamespace.MyType", "M:MyMethod"], + }; + + var xml = original.SaveToXml(); + + var loaded = new SessionSettings(); + loaded.LoadFromXml(xml); + + loaded.ActiveTreeViewPath.Should().Equal("My.Assembly.dll", "MyNamespace.MyType", "M:MyMethod"); + } } diff --git a/ILSpy/AssemblyTree/AssemblyListPane.axaml b/ILSpy/AssemblyTree/AssemblyListPane.axaml index 64c9e6fd8..c0788f71c 100644 --- a/ILSpy/AssemblyTree/AssemblyListPane.axaml +++ b/ILSpy/AssemblyTree/AssemblyListPane.axaml @@ -15,7 +15,8 @@ GridLinesVisibility="None" IsReadOnly="True" CanUserResizeColumns="False" - SelectionMode="Single"> + SelectionMode="Single" + SelectionChanged="OnTreeGridSelectionChanged">