Problem
If a background section (b_section) is edited, then made the b_section via a save=False flicker (edits committed in memory but not written to disk), and the series is then Save-As'd, the undo baseline re-initialized for that section is taken from its stale on-disk file rather than its in-memory state.
Proposed
Flush the b_section (save it) before re-initializing undo state during Save As (main_window.py ~1549-1550), or assert its file is current. Also add a comment noting SectionStates.initialize's copy path assumes section.filepath is current.
Notes
Surfaced by the adversarial review of the undo-init change in PR #82 (which Closes #73). Pre-existing, not introduced by that change: in this state the section's committed edits are already lost to the saved .jser regardless (save reconstructs from the section files, not in-memory objects), and the undo history is cleared on Save As anyway. Tracking it as a latent save-flush gap.
Problem
If a background section (
b_section) is edited, then made the b_section via asave=Falseflicker (edits committed in memory but not written to disk), and the series is then Save-As'd, the undo baseline re-initialized for that section is taken from its stale on-disk file rather than its in-memory state.Proposed
Flush the
b_section(save it) before re-initializing undo state during Save As (main_window.py~1549-1550), or assert its file is current. Also add a comment notingSectionStates.initialize's copy path assumessection.filepathis current.Notes
Surfaced by the adversarial review of the undo-init change in PR #82 (which Closes #73). Pre-existing, not introduced by that change: in this state the section's committed edits are already lost to the saved
.jserregardless (save reconstructs from the section files, not in-memory objects), and the undo history is cleared on Save As anyway. Tracking it as a latent save-flush gap.