Skip to content

[0108] 主页 Open 卡片打开文件时默认定位到最近文档目录#3328

Merged
da-liii merged 2 commits into
mainfrom
da/0108/open
May 13, 2026
Merged

[0108] 主页 Open 卡片打开文件时默认定位到最近文档目录#3328
da-liii merged 2 commits into
mainfrom
da/0108/open

Conversation

@da-liii

@da-liii da-liii commented May 13, 2026

Copy link
Copy Markdown
Contributor

改进点

当用户处于启动页主页、尚未打开任何文档时,点击 "Open" 卡片弹出的文件对话框默认目录未与最近文档列表关联,导致用户需要手动导航到目标目录。

变更内容

  • 修改 QtHomePage::createDocumentWithStyle,当 styleId == \"open\"recentDocs_ 非空时,提取最新最近文档的目录作为文件对话框的默认路径
  • 无最近文档时完全保持原有行为

测试方式

  1. 启动应用,确保没有打开任何文档
  2. 确认主页最近文档列表非空
  3. 点击 "Open" 卡片,文件对话框应默认定位到最新最近文档所在目录
  4. 清空最近文档后再次点击,行为与之前一致

🤖 Generated with Claude Code

da-liii and others added 2 commits May 13, 2026 08:47
当主页最近文档列表非空时,点击 Open 卡片会将文件对话框
默认目录设为最新最近文档所在目录,减少用户导航成本。
无最近文档时保持原有行为。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@Yuki-Nagori Yuki-Nagori left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@da-liii da-liii merged commit 50d97b7 into main May 13, 2026
5 checks passed
@da-liii da-liii deleted the da/0108/open branch May 13, 2026 01:26
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