From e914647e5647985a8daebe351b8ce6665556385b Mon Sep 17 00:00:00 2001 From: liujinchang Date: Fri, 30 Oct 2026 03:58:19 +0800 Subject: [PATCH] fix: clear selection state on backup result page back MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: backPage() only emitted changeWidget signal to switch page, missing clearWidget signal to reset selection controls 2. Fix: add emit clearWidget before changeWidget, matching the pattern used by ErrorWidget::backPage() and two other callers 3. Impact: returning to selection page after export now clears previous file selections; no effect on other navigation paths Log: Clear previous file selections when returning to selection page Influence: 1. Test file export then back to verify selections are cleared 2. Test normal export flow still works correctly 3. Verify no regression on other page navigation paths fix: 返回选择页面时清空历史选择状态 1. 根因:backPage() 仅发射 changeWidget 信号切换页面,遗漏 clearWidget 信号清空选择控件状态 2. 方案:在 changeWidget 前添加 emit clearWidget,与 ErrorWidget::backPage() 等三处正确范式保持一致 3. 影响:导出后返回选择页面将清空历史选择,不影响其他导航路径 Log: 返回选择页面时清空历史选择状态 Influence: 1. 测试文件导出后返回,验证选择已被清空 2. 测试正常导出流程仍正常工作 3. 验证其他页面导航路径无回归 PMS: BUG-262109 --- .../core/gui/getbackup/zipfileprocessresultwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/data-transfer/core/gui/getbackup/zipfileprocessresultwidget.cpp b/src/plugins/data-transfer/core/gui/getbackup/zipfileprocessresultwidget.cpp index 4d44eeb1a..69f268ea1 100644 --- a/src/plugins/data-transfer/core/gui/getbackup/zipfileprocessresultwidget.cpp +++ b/src/plugins/data-transfer/core/gui/getbackup/zipfileprocessresultwidget.cpp @@ -135,6 +135,7 @@ void ZipFileProcessResultWidget::upWidgetToFailed(const QString &content, int pr void ZipFileProcessResultWidget::backPage() { + emit TransferHelper::instance()->clearWidget(); emit TransferHelper::instance()->changeWidget(PageName::choosewidget); }