Skip to content

Preferences dialog does not update state after selection of current sketchbook location path #1259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
per1234 opened this issue Jul 27, 2022 · 2 comments
Open
3 tasks done
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Jul 27, 2022

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.

image

To reproduce

  1. Rename or delete (⚠ carefully!) your sketchbook folder.
  2. 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.
  3. Create the path currently set in the "Sketchbook location" field.
  4. Click the BROWSE button on the right side of the "Sketchbook location" field.
  5. Select the path currently set in the "Sketchbook location" field.
  6. Click the Choose button.
    🐛 The "Invalid sketchbook location ..." message is still incorrectly shown in the "Preferences" dialog. The OK button is still disabled.
  7. 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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 27, 2022
@fpistm
Copy link

fpistm commented Sep 15, 2022

Thanks @per1234 to reporting this issue.
I also met this issue with official 2.0.0 release.

@5X-RTLV
Copy link

5X-RTLV commented Oct 23, 2022

This issue is replicable on MacOS 12.6 with the Arduino IDE 2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants