[212_5]: Fix PDF export wait indicator not disappearing (#2621)#2907
[212_5]: Fix PDF export wait indicator not disappearing (#2621)#2907divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
Conversation
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.
There was a problem hiding this comment.
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.
| (system-wait "" "") | ||
| (user-confirm-open-pdf fname)) |
There was a problem hiding this comment.
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).
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-waitmechanism uses a stack: a non-empty message pushes a dialog, an empty message pops it. All C++ callers correctly callsystem_wait("")to dismiss the dialog, but the three Scheme PDF export functions intm-print.scmnever popped it.Fix
Added
(system-wait "" "")after export completes in:wrapped-print-to-filewrapped-print-to-pdf-embeded-with-tmwrapped-print-to-pdf-embeded-with-tmuHow to test
File -> Export -> Pdf...Editable Pdf (tm)andEditable Pdf (tmu)