-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Steps to reproduce
- Open any assembly, then expand some members until you can scroll it for 2~3 page long.
- Click one node, then click code pane to focus it.
- Hover over the assembly pane (don't click yet), scroll until you can't see selected node.
- Click a new node, you will see it scrolling back to the old one, while the new one has been selected.
Expected
Newly selected node should be scrolled to rather than the old one. (Or just don't scroll because if you select it by mouse directly, you must have it in view at that moment.)
Better solutions could be:
A: Scroll the pane into selected node when the code pane becomes active, rather than the assembly tree. (And can be turned off by option/toolbar)
B: Allow users to disable auto scrolling, and provide a toolbar button to scroll to current opened node.
Either way, I think to scroll or not should be decided at initiator side.
Details
- Product in use: ILSpy
- Version in use: 9.0.0.7889+e94eb917395e50c74ea363a79df3514538989daa
- Any other relevant information to the issue, or your interest in contributing a fix.
It might be these lines conflicting with selection related stuff:
ILSpy/ILSpy/AssemblyTree/AssemblyListPane.xaml.cs
Lines 66 to 80 in e94eb91
| else if (e.Property == Pane.IsActiveProperty) | |
| { | |
| if (!true.Equals(e.NewValue)) | |
| return; | |
| if (SelectedItem is SharpTreeNode selectedItem) | |
| { | |
| // defer focusing, so it does not interfere with selection via mouse click | |
| this.BeginInvoke(() => FocusNode(selectedItem)); | |
| } | |
| else | |
| { | |
| Focus(); | |
| } | |
| } |