Skip to content

fix: ppt开始放映时性能优化#510

Closed
Braydenccc wants to merge 2 commits into
InkCanvasForClass:net6from
Braydenccc:jby-ppt-fix
Closed

fix: ppt开始放映时性能优化#510
Braydenccc wants to merge 2 commits into
InkCanvasForClass:net6from
Braydenccc:jby-ppt-fix

Conversation

@Braydenccc
Copy link
Copy Markdown
Contributor

原来 UpdateSlideShowStatus(true, ...) 会把 IsInPptPresentationMode = true 放进 UI 调度队列里异步执行,但调用方马上会执行 CheckMainWindowVisibility(),因此在仅 PPT 模式下可能读到旧的 false,导致窗口不能立刻显示。

Copilot AI review requested due to automatic review settings May 30, 2026 18:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates slideshow UI state changes to run safely on the UI thread and reduces duplicated state assignments.

Changes:

  • Extracted UI-update logic into a local function and used Dispatcher.CheckAccess() to decide direct vs dispatched execution.
  • Centralized IsInPptPresentationMode assignment to isInSlideShow rather than setting it separately in each branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +147 to +154
if (_dispatcher.CheckAccess())
{
UpdateSlideShowStatusOnUi();
}
else
{
_dispatcher.Invoke(UpdateSlideShowStatusOnUi);
}
@Braydenccc Braydenccc closed this May 30, 2026
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