Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

TreeView selection highlighting disappears when exports are modified or packages are saved, making it impossible to determine the current sequence in files with duplicate sequence names.

Root Cause

When modifications occur, LoadSequences() disposes all TreeViewEntry objects and creates new ones. TreeViewHelper only syncs the binding passively—it doesn't restore the IsSelected property on the new objects.

Changes

  • Replace TreeViewHelper with NodeTreeSelectionBehavior in SequenceEditorWPF.xaml
  • NodeTreeSelectionBehavior actively manages IsSelected state during selection changes
- <peregrineTreeView:TreeViewHelper BoundSelectedItem="{Binding SelectedItem}" />
+ <peregrineTreeView:NodeTreeSelectionBehavior SelectedItem="{Binding SelectedItem}" />

This matches PackageEditor's implementation, which already switched from TreeViewHelper to NodeTreeSelectionBehavior to solve the same issue (commented-out code still visible in PackageEditorWindow.xaml).

Original prompt

This section details on the original issue you should resolve

<issue_title>Sequence Editor - very difficult to determine current sequence on modification/save</issue_title>
<issue_description># Please fill out the following form in its entirety.
The more information you provide, the easier it will be for us to reproduce the issue.

Describe the bug
Sequence Editor is very inconsistent in dispalying the current selected sequence. It often 'deselects' a sequence, which means you have no idea what sequence you are in. In files that have multiple duplicate named sequences - it makes it extremely difficult to tell which export is selected. Additionally, if a sequence is modified, you have no way to tell what is selected. This is due to how the tree view is set up in Sequence Editor's XAML file.

To Reproduce
Open Sequence Editor, any package.

For the export modification issue, simply edit an object in the sequence - such as cloning, trashing, etc.

For the unselected UI, you need to modify an export, and then save the package, so the modification layer goes away. You are then left without any selected sequence color coding. This is a very common occurrence.

Expected behavior
Tree view should behave like package editor's tree view and properly update on save and have selections visible

Screenshots and files used to replicate this
If applicable, add screenshots to help explain your problem.

image

Version information:
Please include both the date and version number that is located on the top right side of the main window. This information is required.

Nightly

Stack trace
If you see an error dialog with a details or copy button, please post the details here.
N/A

Other information
Add any other context about the problem here.
N/A</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…tor to fix selection visibility

Co-authored-by: Mgamerz <2738836+Mgamerz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix display issue in Sequence Editor for current sequence Fix Sequence Editor TreeView selection visibility after modifications Jan 11, 2026
Copilot AI requested a review from Mgamerz January 11, 2026 14:36
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.

Sequence Editor - very difficult to determine current sequence on modification/save

2 participants