fix(page_layout): apply margins to current page in Apply To selection (#144) - #149
Merged
pablogventura merged 1 commit intoMay 24, 2026
Conversation
Apply Margins used to skip m_pageId even when the dialog included the current page (e.g. "This page and the following every other page"), so alternating margin workflows did not persist settings for the active page. Add PageSequence unit tests for the 75-page every-other pattern from ScanTailor-Advanced#144.
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.
Summary
PageSequenceunit tests for the 75-page alternating pattern described in BUG: Apply margins to every other page #144.Root cause
OptionsWidget::applyMarginsignoredpageId == m_pageId, so the current page was never updated in project settings while other pages in the same selection were. Alternating workflows (odd/even margin presets) could look correct in the UI for the active page but diverge from stored params on other pages, and the active page itself was not persisted on apply.Test plan
core_tests --run_test=PageSequenceTestSuitepasses.Not merging yet — please confirm on a real project.
Fixes #144