Description
Describe the problem
The OK button in the Arduino IDE "Preferences" dialog is disabled when the path set in the "Sketchbook location" field does not exist, and the problem clearly communicated via a message at the bottom of the dialog:
Invalid sketchbook location: c:\Users\per\Documents\Arduino
The user must select a valid location before they can save the preferences.
🐛 If the user creates the path currently set in the "Sketchbook location" field, then selects that via the dialog opened via the BROWSE button, the "Preferences" dialog remains in the "Invalid sketchbook location" state with the disabled OK button, even though the location is now valid.
To reproduce
- Rename or delete (⚠ carefully!) your sketchbook folder.
- Select File > Preferences from the Arduino IDE menus.
🙂 The OK button is disabled with the dialog correctly communicating the problem of an invalid sketchbook location. - Create the path currently set in the "Sketchbook location" field.
- Click the BROWSE button on the right side of the "Sketchbook location" field.
- Select the path currently set in the "Sketchbook location" field.
- Click the Choose button.
🐛 The "Invalid sketchbook location ..." message is still incorrectly shown in the "Preferences" dialog. The OK button is still disabled. - Change any other preference.
🙂 The "Invalid sketchbook location ..." message disappears and the OK button is enabled.
Expected behavior
The preferences are rechecked for validity after the user exits the "Select new sketchbook location" dialog opened by the BROWSE button on the right side of the "Sketchbook location" field, even when that did not result in a change to the field value.
Arduino IDE version
2.0.0-rc9-snapshot-9373a0b
Operating system
Windows
Operating system version
10
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