fix: apply selected paper size after printer settings rebuild - #774
fix: apply selected paper size after printer settings rebuild#77418202781743 wants to merge 1 commit into
Conversation
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
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
|
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. 验证对话框和打印机设置之间纸张大小选择保持一致
a1a2247 to
cabe80d
Compare
|
/integrate |
|
AutoIntegrationPr Bot |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia, robertkill 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 |
Summary
Tests
cmake --build build -j6 --target ut-dtkwidgetcmake --build build6 -j6 --target dtk6widgetSummary by Sourcery
Ensure the print preview uses the selected paper size consistently after printer settings are rebuilt.
Bug Fixes:
Tests: