Skip to content

fix(page_layout): apply margins to current page in Apply To selection (#144) - #149

Merged
pablogventura merged 1 commit into
ScanTailor-Advanced:masterfrom
pablogventura:fix/issue-144-margins-apply-pattern
May 24, 2026
Merged

fix(page_layout): apply margins to current page in Apply To selection (#144)#149
pablogventura merged 1 commit into
ScanTailor-Advanced:masterfrom
pablogventura:fix/issue-144-margins-apply-pattern

Conversation

@pablogventura

Copy link
Copy Markdown

Summary

  • Apply Margins no longer skips the active page when it is part of the page set chosen in the dialog (including This page and the following every other page).
  • Adds PageSequence unit tests for the 75-page alternating pattern described in BUG: Apply margins to every other page #144.

Root cause

OptionsWidget::applyMargins ignored pageId == 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

  • Build passes; core_tests --run_test=PageSequenceTestSuite passes.
  • Community / reporter (BUG: Apply margins to every other page #144): reproduce with attached project — page 1 left 15 cm apply every other forward; page 2 right 15 cm apply every other forward; verify pages 19–20 and end of book keep alternating margins after navigating away and back.
  • Regression: Apply Margins to all pages still works.

Not merging yet — please confirm on a real project.

Fixes #144

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.
@pablogventura
pablogventura merged commit a00c028 into ScanTailor-Advanced:master May 24, 2026
3 checks passed
@pablogventura
pablogventura deleted the fix/issue-144-margins-apply-pattern branch May 24, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Apply margins to every other page

1 participant