mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
Every save reloaded the JSON sidecar into fresh instances and then replaced the whole observable collection with Clear()+Add(). That dropped and re-added every bookmark on each toggle or edit: the bookmarks pane keeps its selection by reference, so it was cleared on every change (leaving the toolbar acting on a stale or null selection), the grid's scroll reset, and a checkbox/name edit made from the grid re-entered the DataGrid mid-edit while its ItemsSource was torn down and rebuilt. Reconcile in place instead: keep the existing instance for any anchor still present (refreshing only its editable Name/Enabled), remove anchors that are gone, and append new ones. A name/enabled edit leaves the membership unchanged, so it now touches the collection not at all; structural changes touch only the affected rows. Instance identity is preserved, so the pane's selection and the gutter's references survive. Assisted-by: Claude:claude-opus-4-8:Claude Codepull/3839/head
2 changed files with 66 additions and 19 deletions
Loading…
Reference in new issue