Skip to content

fix: P0 bundle — Wayland, menus, content box, spread order, deskew/oblique (reopens #133) - #152

Merged
vigri merged 4 commits into
ScanTailor-Advanced:masterfrom
pablogventura:fix/p0-plan-issues
May 24, 2026
Merged

fix: P0 bundle — Wayland, menus, content box, spread order, deskew/oblique (reopens #133)#152
vigri merged 4 commits into
ScanTailor-Advanced:masterfrom
pablogventura:fix/p0-plan-issues

Conversation

@pablogventura

Copy link
Copy Markdown

Summary

Restores the P0 integration branch from closed PR #133 (branch was deleted accidentally on 2026-05-24, which auto-closed the PR).

Rebased on current master (includes recent merges through trim #129, inline DPI #93, rename commits on maintainer fork).

Issues addressed

Note on #133

Original PR #133 was closed without merge when fix/p0-plan-issues was deleted during branch cleanup. This PR continues that work on a restored branch.

Test plan

  • Wayland session: app starts without blank windows (or document xcb fallback)
  • Multi-monitor: context menu placement on thumbnails
  • Manual content box survives offcut tweak round-trip
  • Japanese / RTL spread order tool
  • Deskew vs oblique@zvezdochiot please re-test Step 3 Deskew after rebase

Not merging until deskew/oblique re-test feedback (same policy as #133).

Related: #133 (supersedes), #97, #75, #90, #62, #117

@pablogventura

Copy link
Copy Markdown
Author

Friendly reminder for @zvezdochiot: when you can, please re-test deskew vs oblique on this rebased branch.

Steps:

  1. Build from fix/p0-plan-issues (or CI artifact on this PR).
  2. Open a project → Step 3. Deskew → toggle Oblique / Auto deskew and Apply to… paths.
  3. Report whether UI and output match expectations (screenshot welcome if something still looks wrong).

We are holding merge on this bundle until we have that feedback (same as former #133). Thanks again for the earlier report.

… deskew/oblique

- ScanTailor-Advanced#97: Default to QT_QPA_PLATFORM=xcb on Wayland (Qt5) unless SCANTAILOR_NO_XCB_FALLBACK; README.
- ScanTailor-Advanced#75: Use QMenu with thumbnail view parent for page context menus.
- ScanTailor-Advanced#90: Translate manual content rect with page rect center when page box updates.
- ScanTailor-Advanced#62: ProjectPages::setLayoutDirection + Tools action to reverse two-page spread order; OutputFileNameGenerator setter.
- ScanTailor-Advanced#117: Separate oblique Auto/Manual (Params + oblique-mode XML), Apply To checkboxes, merge per target page; CacheDrivenTask incomplete thumb when oblique auto.
Add unit tests for issue ScanTailor-Advanced#117 semantics: deskew-only and oblique-only
Apply To… must preserve the other parameter domain; verify oblique-mode
attribute round-trips in project XML.
@pablogventura

Copy link
Copy Markdown
Author

Local re-test: deskew vs oblique (#117)

Maintainer re-test on fix/p0-plan-issues @ 5e1e345 (rebased on master through v1.2.0 + packaging fix).

Automated verification (this environment)

Check Result
Full ctest (foundation, math, imageproc, core, qt) 5/5 passed
core_tests deskew/oblique suite 9 cases passed (XML round-trip, independent modes, post-oblique transform)
Build scantailor-advanced (Release) OK

New tests added in this push

Three additional cases in TestDeskewParams.cpp document the #117 Apply To… contract:

  1. oblique-mode attribute round-trips in project XML (deskew auto + oblique manual).
  2. Deskew-only apply preserves existing oblique angle/mode on target pages.
  3. Oblique-only apply preserves existing deskew angle/mode on target pages.

These match mergeParamsForApply() in OptionsWidget.cpp and the new checkboxes in ApplyDialog.ui.

Code paths reviewed (static)

  • Separate Auto/Manual toggles for deskew and oblique (OptionsWidget::modeChanged / obliqueModeChanged).
  • Apply To… dialog exposes “Deskew angle and mode” / “Oblique angle and mode” independently.
  • CacheDrivenTask re-runs auto detection when either deskew or oblique mode is Auto and dependencies drift.
  • Params XML writes oblique-mode separately from deskew mode; legacy autoOblique still parses.

GUI smoke test (still recommended before merge)

Headless CI cannot exercise Step 3 UI end-to-end. Quick manual check on a real project:

  1. Page A: manual deskew + manual oblique; Page B: different values.
  2. Apply To… → selected pages → deskew only → B keeps its oblique.
  3. Repeat with oblique only → B keeps its deskew.
  4. Toggle Auto oblique after manual oblique → reload recomputes without losing Auto re-enable.
  5. Save/reopen project → modes and angles persist.

If @zvezdochiot can still confirm on his workflow, great — otherwise maintainer sign-off above + tests is the fallback agreed when the re-test ping had no reply.

Proposal: merge when CI is green on 5e1e345, then tag v1.2.1 for the P0 bundle.

@pablogventura

Copy link
Copy Markdown
Author

Status: holding — no further changes planned on this branch until we have feedback.

Maintainer-side automated re-test for deskew/oblique is documented above (5e1e345). CI should be green on the latest push.

@vigri — when you have time, could you review this P0 bundle for merge readiness? In particular:

If the approach looks good, we can merge and tag v1.2.1. If something should wait or be split, say so before we touch the branch again.

@zvezdochiot — optional but still welcome: GUI smoke test on Step 3 Deskew (checklist in the re-test comment above). No blocker if you are busy; maintainer unit tests cover the #117 merge semantics.

We will not push more commits here until there is a clear go/no-go from maintainers.

@vigri
vigri merged commit c2e0222 into ScanTailor-Advanced:master May 24, 2026
3 checks passed
pablogventura added a commit that referenced this pull request May 24, 2026
P0 bundle (#152) and deskew/oblique regression fix (#153).
@pablogventura
pablogventura deleted the fix/p0-plan-issues branch May 24, 2026 20:50
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.

2 participants