Description
Describe the problem
If the "Preferences" dialog is opened soon after Arduino IDE is started, after closing the menu the File > Preferences menu item is disabled.
To reproduce
- Start Arduino IDE.
- Watch the Arduino IDE window. As soon as the menu bar appears, select File > Preferences.
- The "Preferences" dialog may be empty. Wait for it to populate.
- Click the "CANCEL" button.
- Open the File menu.
🐛 The File > Preferences menu item is disabled:
Expected behavior
File > Preferences menu item is only disabled if there is a specific reason the preferences dialog should not be accessible to the user (The only reason I can think of is if the dialog is already open, but that should be handled by making the dialog modal).
Arduino IDE version
Operating system
Windows
Operating system version
10
Additional context
I bisected the introduction of the bug to 7d6a2d5 / #1581 (does not occur when using the build for 6984c52).
Similar to #1722 (note they were bisected to the same commit).
The fault does not occur if the IDE startup process is allowed to finish completely (as indicated by the disappearance of the busy spinner next to the mouse pointer).
The menu item is enabled in new Arduino IDE windows that are opened when the menu item is in the disabled state in the parent window.
Even when the menu item is in the disabled state, I can still open the "Preferences" dialog using the keyboard shortcut (Ctrl+,), or "Arduino: Open Preferences" command palette command.
I have experienced a similar fault with Tools > WiFi101 / WiFiNINA Firmware Updater, but have not found a way to reproduce it.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details