fix: apply selected paper size after printer settings rebuild - #774
Open
18202781743 wants to merge 1 commit into
Open
fix: apply selected paper size after printer settings rebuild#77418202781743 wants to merge 1 commit into
18202781743 wants to merge 1 commit into
Conversation
1. Fix issue where printing preview's default custom paper size was not synchronized to printer parameters 2. Add explicit matchFitablePageSize() call in _q_printerChanged() after paper list rebuild 3. The combo-box signal was not guaranteed to fire when the current index remained unchanged after rebuilding the paper list 4. Add unit test verifying the paper size is applied and printer parameters are updated correctly Log: Fixed printing preview issue where custom paper size was not synced to printer parameters Influence: 1. Verify printing preview opens with default custom paper size correctly applied 2. Test printer switching while a custom paper size is selected 3. Confirm the printer parameters reflect the selected paper size after printer changes 4. Test with various paper sizes including custom and standard formats 5. Verify paper size selection remains consistent between the dialog and printer settings fix: 修复打印预览默认自定义纸张未同步到打印机参数的问题 1. 修复打印预览中默认自定义纸张未同步到打印机参数的问题 2. 在 _q_printerChanged() 中纸张列表重建后显式调用 matchFitablePageSize() 3. 当重建纸张列表后当前索引未改变时,下拉框信号可能不会触发 4. 添加单元测试验证纸张大小正确应用且打印机参数同步更新 Log: 修复打印预览中自定义纸张大小未同步到打印机参数的问题 Influence: 1. 验证打印预览以默认自定义纸张大小正常打开 2. 测试在选中自定义纸张时切换打印机 3. 确认打印机切换后打印机参数反映所选纸张大小 4. 测试各种纸张大小,包括自定义和标准格式 5. 验证对话框和打印机设置之间纸张大小选择保持一致
There was a problem hiding this comment.
Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnsures the selected custom paper size is explicitly reapplied after printer settings are rebuilt and adds a regression test to lock in this behavior. Sequence diagram for applying selected paper size after printer changesequenceDiagram
actor User
participant DPrintPreviewDialog
participant PaperSizeCombo
User->>DPrintPreviewDialog:_q_printerChanged(index)
DPrintPreviewDialog->>PaperSizeCombo:blockSignals(true)
DPrintPreviewDialog->>DPrintPreviewDialog:rebuildPaperSizeList()
note over DPrintPreviewDialog: current index may not change
DPrintPreviewDialog->>DPrintPreviewDialog:matchFitablePageSize()
DPrintPreviewDialog->>DPrintPreviewDialog:marginsUpdate(true)
DPrintPreviewDialog->>PaperSizeCombo:blockSignals(false)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
BLumia
approved these changes
Aug 21, 2026
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
Tests
cmake --build build -j6 --target ut-dtkwidgetcmake --build build6 -j6 --target dtk6widgetSummary by Sourcery
Reapply the selected paper size when printer settings change so custom paper selections remain effective.
Bug Fixes:
Tests: