Skip to content

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

Open
@per1234

Description

@per1234

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions