From c9d951e3e43120c77ecf4bd08aab4d9304a58c22 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Oct 2022 04:55:27 -0700 Subject: [PATCH] Update library dependency installation dialog response indexes Arduino libraries may specify dependencies on other libraries in their metadata. The installation of these dependencies is offered by the Arduino IDE when the user installs the dependent library using the Library Manager widget. The order of the buttons in the dialog that offers the dependencies installation was recently rearranged. The dialog response interpretation code was not updated to reflect the changes to the button indexes at that time. This caused the "CANCEL" button to trigger the behavior expected from the "INSTALL ALL" button, and vice versa. The library dependencies installation dialog response interpretation code is hereby updated to use the new button indexes. --- .../src/browser/library/library-list-widget.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arduino-ide-extension/src/browser/library/library-list-widget.ts b/arduino-ide-extension/src/browser/library/library-list-widget.ts index 9e8eba64c..cd2b196df 100644 --- a/arduino-ide-extension/src/browser/library/library-list-widget.ts +++ b/arduino-ide-extension/src/browser/library/library-list-widget.ts @@ -139,12 +139,12 @@ export class LibraryListWidget extends ListWidget< if (result) { const { response } = result; - if (response === 0) { - // All - installDependencies = true; - } else if (response === 1) { + if (response === 1) { // Current only installDependencies = false; + } else if (response === 2) { + // All + installDependencies = true; } } } else {