Only a scan you split can be a diptych - #875
Merged
Merged
Conversation
A whole scan was declared a diptych on the sole evidence that a `<hash>#1` or `<hash>#2` settings row existed. The row is keyed by content hash, so it outlives the folder, the session and the mode being on, and any frame whose hash was ever worked on as two halves came back split, at half width, with a dead controls panel. Discovery now records the base hashes it actually splits with Half Frame on, and both readers require that record. Existing pairs are deliberately not backfilled, since a backfill reproduces the stale claim: those scans render whole again, keep both halves' edits, and return as diptychs the next time they are split.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #874. That PR fixed two ways a frame got stuck as a half-frame diptych; this removes the cause both shared.
The problem
_mark_diptychsdeclared a whole scan a diptych purely because a<hash>#1or<hash>#2settings row existed:Those rows are keyed by content hash, so they outlive the folder, the session and Half Frame being on. Any frame whose hash was worked on as two halves once came back split for good, at half width, with a disabled controls panel. #874 closed two ways such a row appears (composites, auto-metering); the inference itself stood.
The change
Discovery records the base hashes it actually splits with Half Frame on, in a
half_frame_scansglobal setting, and both readers require that record.diptych_configsrejects an unrecorded hash, and_mark_diptychsflags every unrecorded, composite or half-suffixed scandiptych = Falseso the lookup is skipped later too.Existing pairs are deliberately not backfilled, because a backfill reproduces the stale claim. Such a scan renders whole again, keeps both halves' edits, and returns as a diptych the next time it is split.
Docs: the half-frame section says which scans come back as diptychs, and its prose lost the em dashes it had picked up.
Verification
diptych_configsand the_mark_diptychs/diptych_pairlevel, plus the split-scan set write path.make lint,make typeclean; 4173 tests pass. Two failures intests/scanners/test_backend_registry.pyare pre-existing here (pyopticfilmnot installed), confirmed by stashing.