mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-26 11:46:49 -06:00
do_sort moved cells, formulas, cell pictures, row heights and floating object anchors through the sort permutation, and remove_duplicates moved cells and pictures through the compaction, but neither touched Sheet::comments or Sheet::hyperlinks (keyed by CellRef): a note that described one record stayed behind and annotated whatever landed on that row — 'late payment' on a paid invoice — and a note on a row removed by Remove Duplicates annotated blank cells. Sheet::comments/hyperlinks are exactly the range-scoped side data that row and column inserts already remap and edit.clear already clears, so the omission looks unintended. Both maps now travel through the same permutation the cells use (the sort collects before re-inserting, so a swap cannot resurrect an entry from a destination that is also a source; Remove Duplicates compacts the kept rows and drops the rest). Regression test: sort_and_remove_duplicates_move_the_rows_notes_and_links — on main the note and link stay on their old cells; with the fix they travel with their record.