Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[212_5]: Fix PDF export wait indicator not disappearing (#2621)#2907

Open
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
divyansharma001:da/200_27/fix_pdf_export_wait_indicator
Open

[212_5]: Fix PDF export wait indicator not disappearing (#2621)#2907
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
divyansharma001:da/200_27/fix_pdf_export_wait_indicator

Conversation

@divyansharma001
Copy link
Contributor

Issue

Fixes #2621 — The "导出中, 请稍后…" (Exporting, please wait) wait indicator does not disappear after PDF export completes, overlapping with the "Open PDF?" confirmation dialog.

Root Cause

The system-wait mechanism uses a stack: a non-empty message pushes a dialog, an empty message pops it. All C++ callers correctly call system_wait("") to dismiss the dialog, but the three Scheme PDF export functions in tm-print.scm never popped it.

Fix

Added (system-wait "" "") after export completes in:

  • wrapped-print-to-file
  • wrapped-print-to-pdf-embeded-with-tm
  • wrapped-print-to-pdf-embeded-with-tmu

How to test

  1. Open any document, click File -> Export -> Pdf...
  2. Verify the wait indicator disappears automatically after export
  3. Verify the "Open PDF?" dialog appears cleanly
  4. Repeat with Editable Pdf (tm) and Editable Pdf (tmu)

The system-wait dialog was never dismissed after PDF export because
the three export functions (wrapped-print-to-file,
wrapped-print-to-pdf-embeded-with-tm, wrapped-print-to-pdf-embeded-with-tmu)
called (system-wait) to show the indicator but never called
(system-wait "" "") to pop it from the stack.

Added (system-wait "" "") after the export completes in all three functions.
Copilot AI review requested due to automatic review settings March 2, 2026 06:59
Copy link
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

Fixes a UI regression where the “导出中, 请稍后…” wait indicator remains visible after PDF export finishes, causing it to overlap the subsequent “Open PDF?” confirmation dialog.

Changes:

  • Dismiss the wait indicator after PDF export completes by adding (system-wait "" "") in three Scheme export wrappers.
  • Add a developer note (devel/212_5.md) documenting the root cause, fix, and manual test steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
devel/212_5.md Adds a short dev log entry describing the wait-indicator stack behavior and how the Scheme PDF export flow now dismisses it.
TeXmacs/progs/texmacs/texmacs/tm-print.scm Ensures the wait indicator is popped after export completion (before the “Open PDF?” confirm) for PDF and embedded-PDF export paths.

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

Comment on lines +98 to 99
(system-wait "" "")
(user-confirm-open-pdf fname))
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

wrapped-print-to-file is used by the menu for both PDF and PostScript exports, but it always calls user-confirm-open-pdf (dialog text: "Open PDF?") and previews via preview-file. This makes the confirmation message inaccurate for non-PDF exports; consider either (a) switching the prompt text to something suffix-agnostic (e.g., "Open exported file?") or (b) selecting the confirmation/prompt based on (url-suffix fname).

Copilot uses AI. Check for mistakes.
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.

导出pdf导出中弹窗未消失

2 participants