mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-19 17:06:23 +01:00
Fixes #1986 **Cause.** On macOS the open panel has no key equivalents of its own. Cmd+A (and C/V/X/Z) work because the menu bar sends `selectAll:`, `copy:` and so on down the responder chain to the key window. EffectCraft's Edit items are custom muda items, so while the sheet was up Cmd+A ran Edit > Select All on the Project panel behind it. **Fix.** The native file dialogs on screen are counted (`native_dialogs`). While one is open on macOS, Undo / Redo / Cut / Copy / Paste / Select All become macOS predefined items, which send the real actions to the dialog. The other `edit.*` items are disabled. The UI is repainted when a dialog opens so the menu is rebuilt before the next key. **Tests.** `edit_menu_is_disabled_while_a_file_dialog_is_open`, `edit_text_commands_are_predefined_while_a_file_dialog_is_open`. Checked by hand on macOS: Cmd+A in "Import multiple files" selects the files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * On macOS, Edit menu commands are disabled while a native file dialog is open and return to their appropriate enabled state when it closes or is canceled. * While a dialog is open, Undo, Redo, Cut, Copy, Paste, and Select All appear as native macOS menu commands with their current labels. * Opening a file dialog now triggers an immediate interface refresh, helping the menu update before the next key event. <!-- end of auto-generated comment: release notes by coderabbit.ai -->