mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-03 17:04:43 -06:00
When a region is chosen in File › Options, start-up replaces the first blank document with one on that region's paper through `session.set_document`. That changes the session's active document, but the window still showed the old one, so on the first frame `sync_document` took the change for a switch of document and cleared the dialog. A password-protected file named on the command line (a double-click in the file manager) had just asked for its password with `file.open`, so the Password box was dropped before it was drawn and a blank Document1 stayed. `WordApp::replace_startup_document` swaps the document and lets the window follow at once; the start-up code uses it. Before the file is opened, so nothing is open to lose. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>